Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mmaurier opened this issue Mar 11, 2019 · 0 comments
Open

Comments

@mmaurier
Copy link

@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();

}

}

@mmaurier mmaurier changed the title this JokeController worked for me, the one on the repository this JokeController worked for me, not the one on the repository Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant