SSM框架整合之单独整合Mybatis
导入必须jar包 mybatis核心jar包 mybatis依赖jar包 数据库驱动包 建立数据库表 建立实体类 建立Mapper接口 建立sql映射文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!-- 编写sql语句 --> <mapper namespace="com.fei.dao.CustomerMapper"> <select id="selectList" resultType="com.fei.domain.Customer"> select * from t_customer </select> </mapper> 建立sqlMapConfig.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> <!--