<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN" "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
<mapper namespace="com.hx.dao.PersonDao">
<select id="getOneById" parameterType="int" resultType="com.hx.entity.Person">
select * from person where id=#{id}
</select>
<select id="getAll" resultType="com.hx.entity.Person">
select * from person
</select>
</mapper>
spring:
datasource:
url: jdbc:mysql://localhost:3306/test1?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
mybatis.mapper-locations: classpath:mapper/*.xml