1.Could not autowire. No beans of ‘xxxx’ type found:
参考(https://blog.youkuaiyun.com/u012453843/article/details/54906905)
最终解决方法:
导入正确的包:
import org.springframework.stereotype.Service;
2.Postman报错Error: connect ECONNREFUSED 127.0.0.1:80
原因:数据库没连接
解决方法:连接数据库
3.Dao层@Column标红:
参考:(https://blog.youkuaiyun.com/weixin_46822367/article/details/116916643)
解决方法:
为其分配数据源
选择对应的数据源:
完成
4.No EntityManager with actual transaction available for current thread - cannot reliably process ‘xxx’ call
原因:进行删除操作时没有进行事务管理
解决方法:在对应的@Service上添加@Transactional