SpringApplication @MapperScan扫描多个配置

 目前项目需要整合,整合的过程中发现报错Error creating bean with name xxxcontroller

 原因是通过最底层mapper注解往上扫描找不到对应的controller,层级关系不对。

解决方法:

1、通过配置配置@MapperScans({@MapperScan("com.yt.*.mapper"),@MapperScan("com.yt.*.*.mapper")})

2、调整base下面的controller结构也可以,需要改动代码结构

猜你喜欢

转载自blog.csdn.net/weixin_39709134/article/details/131703780