解决:Could not find SQL statement to include with refid
2022/2/6 2:12:24
本文主要是介绍解决:Could not find SQL statement to include with refid,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
请检查xml文件的SQL标签和resultMap标签内容是否写正确了。 下面是正确的写法样例。
<?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"> <mapper namespace="com.wyx.dao.SysUserMapper"> <resultMap id="BaseResultMap" type="com.wyx.model.SysUser"> <id column="id" jdbcType="BIGINT" property="id" /> <result column="name" jdbcType="VARCHAR" property="name" /> <result column="nick_name" jdbcType="VARCHAR" property="nickName" /> <result column="avatar" jdbcType="VARCHAR" property="avatar" /> <result column="password" jdbcType="VARCHAR" property="password" /> <result column="salt" jdbcType="VARCHAR" property="salt" /> <result column="email" jdbcType="VARCHAR" property="email" /> <result column="mobile" jdbcType="VARCHAR" property="mobile" /> <result column="status" jdbcType="TINYINT" property="status" /> <result column="dept_id" jdbcType="BIGINT" property="deptId" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="last_update_by" jdbcType="VARCHAR" property="lastUpdateBy" /> <result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime" /> <result column="del_flag" jdbcType="TINYINT" property="delFlag" /> </resultMap> <sql id="Base_Column_List"> id, name, nick_name, avatar, password, salt, email, mobile, status, dept_id, create_by, create_time, last_update_by, last_update_time, del_flag </sql> <select id="findAll" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from sys_user </select> </mapper>
这篇关于解决:Could not find SQL statement to include with refid的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-27Rocket消息队列资料:新手入门指南
- 2024-11-27rocket消息队资料详解与入门指南
- 2024-11-27RocketMQ底层原理资料详解入门教程
- 2024-11-27RocketMQ项目开发资料:新手入门教程
- 2024-11-27RocketMQ项目开发资料详解
- 2024-11-27RocketMQ消息中间件资料入门教程
- 2024-11-27初学者指南:深入了解RocketMQ源码资料
- 2024-11-27Rocket消息队列学习入门指南
- 2024-11-26Rocket消息中间件教程:新手入门详解
- 2024-11-26RocketMQ项目开发教程:新手入门指南