@RestController注解相当于@ResponseBody + @Controller合在一起的作用。使用@RestController注解不能返回页面,页面解析器无法解析jsp,html页面。
@SpringBootApplication = (默认属性)@Configuration + @EnableAutoConfiguration + @ComponentScan。
@RestController注解相当于@ResponseBody + @Controller合在一起的作用。使用@RestController注解不能返回页面,页面解析器无法解析jsp,html页面。
@SpringBootApplication = (默认属性)@Configuration + @EnableAutoConfiguration + @ComponentScan。