Consider defining a bean of type 'service' in your configuration [Spring boot]

前端 未结 13 1546
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 01:35

I get error when I run the main class.

Error:

Action:
Consider defining a bean of type \'seconds47.service.TopicService\' in your c         


        
13条回答
  •  清歌不尽
    2020-12-10 01:45

    You have to update your

    scanBasePackages = { "com.exm.java" }
    

    to add the path to your service (after annotating it with @service )

提交回复
热议问题