Skip to content

Instantly share code, notes, and snippets.

@klaud81
Created March 27, 2019 01:50
Show Gist options
  • Save klaud81/71f17b7138928f5064e31c635fa6183d to your computer and use it in GitHub Desktop.
Save klaud81/71f17b7138928f5064e31c635fa6183d to your computer and use it in GitHub Desktop.
spring-writer-2
@Component
public class WelcomeService {
//Bla Bla Bla
}
@RestController
public class WelcomeController {
@Autowired
private WelcomeService service;
@RequestMapping("/welcome")
public String welcome() {
return service.retrieveWelcomeMessage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment