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,以后不能再犯。