Giter Site home page Giter Site logo

spring5-jokes-app's Introduction

Spring Boot Jokes App

This Spring Boot web application displays a random Chuck Norris Joke on the index.

This repository is for an example application built in my Spring Framework 5 - Beginner to Guru

You can learn about my Spring Framework 5 Online course here.

spring5-jokes-app's People

Contributors

springframeworkguru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

spring5-jokes-app's Issues

this JokeController worked for me, not the one on the repository

@RestController
public class JokeController {

private JokeService jokeService;

@Autowired
public JokeController(JokeService jokeService) {
    this.jokeService = jokeService;
}

@RequestMapping("/norris")
public String showJoke() {

// public Model showJoke(Model model) {

// model.addAttribute("joke", jokeService.getJoke());
// return model;
return jokeService.getJoke();

}

}

The Template resolver does not work.

Checkout to custom-banner branch
Run :- mvn spring-boot:run
Go to localhost:8080
You'll get :-

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Apr 10 15:17:47 IST 2018
There was an unexpected error (type=Not Found, status=404).
No message available

Which is fixed if you change parent version to 1.4.2 (From 2.0.0) in pom.xml :-

org.springframework.boot
spring-boot-starter-parent
1.4.2.RELEASE

Can you help me out with this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.