![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MyBatis
Cloud-Future
这个作者很懒,什么都没留下…
展开
-
Maven项目中使用MyBatis Generator插件
Maven项目中使用MyBatis Generator插件生成代码 MyBatis Generator官方提供了一个Maven 插件用于在Maven 项目中快速生成代码。 在pom中引入插件: <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>my...原创 2018-12-19 16:24:43 · 259 阅读 · 0 评论 -
MyBatis 使用阿里的Druid连接池
MyBatis默认提供了一个数据库连接池PooledDataSource,一般我们只需要在配置文件中配置,然后就可以使用 <dataSource type="POOLED" > <property name="driver" value="${driver}"/> <property name="url" value=&q原创 2019-01-07 13:15:31 · 14113 阅读 · 1 评论 -
MyBatis 动态SQL之foreach
foreach通常用于构建带IN查询条件的SQL语句,需求是通过对一个集合进行遍历来构建动态SQL 。比如: <select id="selectPostIn" resultType="domain.blog.Post"> SELECT * FROM POST P WHERE ID in <foreach item="item" index="index" c...原创 2019-01-24 10:28:10 · 569 阅读 · 0 评论