SpringBoot項目中mapper依賴不到

SpringBoot加這個註解@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})

 關閉特定的自動配置,導致mapper文件不能注入系統,會報下面的錯誤信息:


Description:

Field userPOMapper in com.project.manage.service.impl.LoginServiceImpl required a bean of type 'com.project.manage.mapper.UserPOMapper' that could not be found.

Action:

Consider defining a bean of type 'com.project.manage.mapper.UserPOMapper' in your configuration.



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章