1.新建XXXMapper.xml
<?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">
<select id="selectAll" resultType="String">
<mapper namespace="com.azure.mapper.XXXMapper">
<select id="selectAll" resultType="String">
<![CDATA[ //mybatis Prevent Special Symbol Translation
select userName from user
]]>
</select>
</select>
</mapper>
2.新建XXXMapper文件
@Repository
public interface PcrPrdVehicleRangeMapper {
List<User> selectAll();
}
大功告成! 仅供参考