mybatis.xml
<?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>
<!--1.属性文件的读取-->
<properties resource="jdbc.properties"></properties>
<!--2.指定Log4j文件-->
<settings>
<setting name="logImpl" value="LOG4j"/>
</settings>
<!-- 3.给实体类起别名-->
<typeAliases>
<package name="com.bjsxt.entity"/>
</typeAliases>
<!-- 4.配置链接数据库环境-->
<environments default="mysql">
<environment id="mysql">
<transactionManager type="JDBC"></transactionManager>
<dataSource type="POOLED">
<property name="driver" value="${m_driver}"/>
<property name="url" value="${m_url}"/>
<property name="username" value="${m_username}"/>
<property name="password" value="${m_password}"/>
</dataSource>
</environment>
</environments>
<!--5.扫描mapper文件-->
<mappers>
<mapper resource="com/bjsxt/mapper/FlowerMapper.xml"></mapper>
<!-- <package name="com.bjsxt.mapper"/>-->
</mappers>
</configuration>