This code uses Spring
@RestController
annotation, which marks the class as a controller where every method returns a domain object instead of a view. It is shorthand for including both@Controller
and@ResponseBody
.
以上为Springboot官网,意思是 @RestController
=@Controller
+ @ResponseBody
@RestController
public class GreetingController {
private static final String tem