springboot中controller层不能使用@RestController注解
pom.xml文件中添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
本文探讨了在SpringBoot项目中使用@RestController注解的方法,并强调了在pom.xml中正确添加spring-boot-starter-web依赖的重要性。
springboot中controller层不能使用@RestController注解
pom.xml文件中添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
268
1091
1054

被折叠的 条评论
为什么被折叠?
