@MapperScan(basePackages =
时间: 2023-10-26 22:00:18 浏览: 110
MyBatis多数据源的两种配置方式
5星 · 资源好评率100%
@MapperScan(basePackages = {"com.aa.**.mapper","com.bb.**.mapper"})是用于Mybatis的注解配置中,用于指定要扫描的Mapper接口的包路径。在这个配置中,使用了占位符${mybatis.mapperScanner.basePackage}来动态指定包路径,这个占位符的值可以从其他配置文件中获取。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [SpringBoot MapperScan添加动态配置(占位符)](https://blog.csdn.net/u014704612/article/details/106302123)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [@MapperScan( basepackages ={},markerInterface = .class) basepackages失效](https://blog.csdn.net/hsRick/article/details/130873806)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文