@Mapper的依赖
时间: 2023-12-04 08:07:47 浏览: 82
@Mapper注解的依赖是通过使用@MapperScan注解来实现的。在@MapperScan注解中,我们可以指定扫描的包路径,该注解会扫描指定包路径下的接口,并将其注入到Spring容器中。在真正使用接口时,通过获取MapperFactoryBean的实例,并调用其getObject()方法,返回的是该接口的代理类MapperProxy。所以,@Mapper注解的依赖可以说是通过MapperScan和MapperFactoryBean来实现的。引用<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [SpringBoot-Mybatis框架使用与源码解析](https://blog.csdn.net/qq_26323323/article/details/81384728)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文