mybaits nor a Result Map was specified,以及transcation对应的@Transcational
来源:互联网 发布:手机看高清网络电视 编辑:程序博客网 时间:2024/05/18 01:37
org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'com.project.modules.admin.dao.mapper.SysRolePermissionMapper.UpdatePermissionByRole'. It's likely that neither a Result Type nor a Result Map was specified.
当出现这个错误时,需要在mapper.xml文件中的select 标签处添加resultType="java.lang.Integer",红色部分请填入相应的参数了;
在xml中如下加入begin transcation 时,需要在server层,加入@Transactional;
<selectid="UpdatePermissionByRole"resultType="java.lang.Integer">
begin transaction
begin try
delete from sys_role_permission where role_code = #{role_code};
insert into sys_role_permission(role_code,permission_code)
select #{role_code} as role_code,p.permission_code from sys_permission p where p.permission_code in(${permission_codes});
select 1 success;
commit transaction
end try
begin catch
select 0 success;
rollback transaction
end catch
</select>
- mybaits nor a Result Map was specified,以及transcation对应的@Transcational
- It's likely that neither a Result Type nor a Result Map was specified
- [工作点滴]It's likely that neither a Result Type nor a Result Map was specified
- Transcational的作用
- A query was run and no Result Maps were found
- A query was run and no Result Maps were found
- 解决linux下Eclipse环境中A program file was not specified in the launch configuration.的问题
- struts2 Result类型和对应的用法
- SQL Transcation的一些总结
- SQL Transcation的一些总结
- SQL Transcation的一些总结
- SQL Transcation的一些总结
- DOS format was specified but only a single line feed character was found, not 2
- DOS format was specified but only a single line feed character was found, not 2
- DOS format was specified but only a single line feed character was found, not 2
- <restriction> element was found that has neither a base [attribute] nor a <simpleType> element among
- springmvc 传递复杂对象参数报 property path is neither an array nor a List nor a Map
- STL Associative Containers Types:map、set、multimap、mutilset以及对应的unordered类型
- SSS1629替代CM108|USB游戏耳机方案|K歌麦克风方案|无线K歌方案
- ubuntu出现有线已连接却无法上网的解决方法(ubuntu连不上网)
- 阿里云服务器Mysql修改密码
- VirtualBox虚拟机中安装CentOS 7(八)安装zookeeper
- 网易2017校招 [编程题] 最长公共子括号序列@Java
- mybaits nor a Result Map was specified,以及transcation对应的@Transcational
- 设计模式
- Python基础——类
- ios开发控制器动画
- Web service是什么?
- java计算两个时间段的精确天数
- LeetCode 15. 3Sum
- Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset
- mysql安装出现error Nr.1045----转