项目中Mybatis问题
SpringBoot中集成Mybatis 报错
Parameter ‘ccConttype’ not found. Available parameters are [arg1, arg0, param1, param2]
//Mapper.class 中的写法
Long selectCountContractStatus( String ccConttype , String ccContstatus);
//Mapper.xml中的写法
<when test="ccConttype != null and ccConttype != '' ">
AND cc_conttype = #{arg0}
</when >
<when test="ccContstatus !=null and ccContstatus != '' ">
AND cc_contstatus = #{arg1}
</when >
解决方法
// An highlighted block
Long selectCountContractStatus(@Param("ccConttype") String ccConttype , @Param("ccConttype")String ccContstatus);
//Mapper.xml中的写法
** <when test="ccConttype != null and ccConttype != '' ">
AND cc_conttype = #{ccConttype}
</when >
<when test="ccContstatus !=null and ccContstatus != '' ">
AND cc_contstatus = #{ccContstatus}
</when >
##Redis问题
报错:ERR Client sent AUTH, but no password is set
问题是SpringBoot Redis配置文件中使用了Redis的密码
而在Redis相关用户配置中并不存在密码
/**Redis Cli**/
127.0.0.1:6379> auth 123
(error) ERR Client sent AUTH, but no password is set
127.0.0.1:6379> auth root
(error) ERR Client sent AUTH, but no password is set
127.0.0.1:6379> CONFIG SET requirepass "123"
OK
127.0.0.1:6379>
或者是直接在项目的Redis配置文件中将密码设置为空
redis-pool.password=
##在JSP页面中如何使得JS取得Model传入的attribute
在网上找了很多相应的方法,都试过来了
只是其中找的一个,其实方法应该是能用的,可能是我的使用方法错了吧
https://www.cnblogs.com/wwct/p/12143084.html
最后偶然发现了最简单的
var ccConttype = "${contract.ccConttype}";
var ccContstatus = "${contract.ccContstatus}";
var ccRealysub = "${contract.ccRealysub}";
直接使用JavaScript进行赋值
###使用 target=‘mainFrame’ 进行框架中的页面跳转
出现问题,点击其中一个页面链接之后,所有的页面全部都变成新页面,不能直接更换框架内页。
查了三天,终于发现,在该页面中定义了全局的name
var name =...
该name导致target中的name失效。所有页面变成了新窗口打开