admin管理员组文章数量:1025202
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,以后不能再犯。
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,以后不能再犯。
本文标签: 解决办法BeandefiningactionConfiguration
版权声明:本文标题:Action:Consider defining a bean of type ‘AdminPunishService‘ in your configuration. 解决办法 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1738336729a1562832.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论