問題:
Description:
Field xxxMapper in xxxxxxx required a bean of type 'xxxxMapper'that could not be found.
The injection point has the following annotations:
-@org.springframework.beans.factory.annotation.Autowired(required=true)
解決方法:
在Spring Boot啟動類Application上添加注解@MapperScan,指定要掃描的Mapper類的包的路徑,如:
@MapperScan("com.example.mapper")