Mercurial > hg > SpringPlayground
view spring-boot-playground/src/main/java/de/comline/spring/controller/HelloController.java @ 6:d57d0c6a841b
Einbau von liquibase zum Erzeugen des Schemas
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 13 Aug 2020 16:18:20 +0200 |
parents | 60afb461bf6c |
children |
line wrap: on
line source
package de.comline.spring.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import de.comline.spring.model.json.Greeting; @RestController public class HelloController { @RequestMapping("/") public String index() { return "Greetings from Spring Boot!\n"; } @RequestMapping(path = "/", consumes = "application/json", produces = "application/json") public Greeting sayHello() { return new Greeting(index()); } }