其他分享
首页 > 其他分享> > MyBatis 中 property 标签多属性配置

MyBatis 中 property 标签多属性配置

作者:互联网

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<environments default="mysql">
<environment id="mysql">
<transactionManager type="JDBC"/>
<dataSource type="POOLED">
<property name="driver" value="com.mysql.cj.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/db1?allowMultiQueries=true&amp;serverTimezone=GMT%2B8"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
</dataSource>
</environment>
</environments>

<mappers>
<mapper resource="com/midea/dao/ListenerDao.xml"/>
</mappers>
</configuration>

"jdbc:mysql://localhost:3306/db1?allowMultiQueries=true&amp;serverTimezone=GMT%2B8"  之间使用  &amp;  分隔多个配置
















标签:allowMultiQueries,标签,DTD,dtd,mybatis,amp,MyBatis,org,property
来源: https://www.cnblogs.com/EthanLoveMath/p/16460067.html