springmybatis接入druid
时间: 2023-08-14 07:02:29 浏览: 109
在接入Druid时,可以选择使用druid-spring-boot-starter来简化配置。这样就不需要单独配置各种bean了。另外,如果在启动类中使用了@MapperScan注解,可以在mapper接口中不再使用@Mapper注解。这样可以批量扫描所有的Mapper接口。\[1\]\[2\]另外,还可以使用mvn命令来生成MyBatis的代码。首先需要在命令行中切换到pom文件所在的目录,然后执行mvn mybatis-generator:generate命令。\[3\]
#### 引用[.reference_title]
- *1* *2* [springboot整合mybatis+druid(详解)](https://blog.csdn.net/weixin_38568503/article/details/121394335)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Spring+Mybatis+Druid 整合Demo](https://blog.csdn.net/vbirdbest/article/details/72821114)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文