SpringApplication @MapperScan scans multiple configurations

 The current project needs to be integrated. During the integration process, an error was reported Error creating bean with name xxxcontroller

 The reason is that the corresponding controller cannot be found by scanning up through the bottom-level mapper annotation, and the hierarchical relationship is incorrect.

Solution:

1. Configure @MapperScans through configuration ({@MapperScan("com.yt.*.mapper"), @MapperScan("com.yt.*.*.mapper")})

2. It is also possible to adjust the controller structure under the base, but the code structure needs to be changed

Guess you like

Origin blog.csdn.net/weixin_39709134/article/details/131703780