检查一些注解是否正确
1.注入的数据类型加入注解@Autowired,
2.service层添加注解@Service
3.在controller层,添加注解@RestController 而不是 @Controller
4.并在JSON数据前加上@RequestBody
5.spring-boot包冲突,再pom.xml文件中删除这个包
我的问题是第三个。
检查一些注解是否正确
1.注入的数据类型加入注解@Autowired,
2.service层添加注解@Service
3.在controller层,添加注解@RestController 而不是 @Controller
4.并在JSON数据前加上@RequestBody
5.spring-boot包冲突,再pom.xml文件中删除这个包
我的问题是第三个。