最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Action:Consider defining a bean of type ‘AdminPunishService‘ in your configuration. 解决办法

运维笔记admin4浏览0评论

Action:Consider defining a bean of type ‘org.unreal.cloud.inner.AdminPunishService’ in your configuration. 解决办法

Description:

Field adminPunishService in AdminPunishController required a bean of type ‘AdminPunishService’ that could not be found.

方法一:在启动类里加注解:
@ComponentScan(value = "org.unreal.cloud.inner.service.*")

但这样会导致http出问题,用postman测试时候报404:

{ “timestamp”: 1600761301783, “status”: 404, “error”: “Not Found”, “message”}…

方法二:在serviceimpl实现类里加注解@service即可。

总结:早上写了个新模块,结果忘记在实现类里加注解,去问大佬,大佬也没注意到,然后自己又试来试去最后才发现是个很低级的bug,以后不能再犯。

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论