mvc控制器和REST控制器

2019-03-01  本文已影响1人  BenjaminCool

https://www.journaldev.com/21515/spring-controller-spring-mvc-controller

Spring Controller

Spring Controller annotation can be applied on classes only. It’s used to mark a class as a web request handler. It’s mostly used with Spring MVC application.

Spring RestController

Spring @RestController is a convenience annotation that is itself annotated with @Controller and @ResponseBody. This annotation is used to mark a class as request handler for RESTful web services.

上一篇 下一篇

猜你喜欢

热点阅读