时间:2021-07-01 10:21:17 帮助过:5人阅读
/*以下得到的是要执行的sql语句,并不是配置的sql语句*/ StatementHandler statementHandler = (StatementHandler)invocation.getTarget(); BoundSql boundSql = statementHandler.getBoundSql(); String originalSql = boundSql.getSql();
https://mybatis.googlecode.com/files/mybatis-spring-1.2.1.zip
mybatis 配置文件中的参数绑定区分大小写,必须与传递的参数名保持一致
1、设定entity的数据类型与数据库类型一致
2、在sql中定义参数的数据类型,比如
where userCode = #{userCode, jdbcType=VARCHAR}
SELECT SEQ_ARCHIVE.NEXTVAL FROM DUAL
insert into user(userName,password) values(#{userName},#{password})
update Tbl_ARCHIVES set title = #{archiveTitle}, content = #{content}, feeValue = #{feeValue} security = #{security}, subjectType = #{subjectType}, gradeType = #{gradeType}, gather = #{gather}, archiveType = #{archiveType}, keyWordName = #{keyWordName} where archivesKey = #{archiveKey}
delete from title where spaArchivesKey = #{archiveKey}