首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
记一笔MyBatis的坑
】的更多相关文章
记一笔MyBatis的坑
记一笔MyBatis的坑 1.sql查询concat()连接函数xml运行查询乱码 ) , ), char)'%') bll FROM fact_dkxx sq 由于连接的字符串中包含数字与百分比字符串,数据类型不一致,在xml中查询返回会导致数据乱码,在数据库执行sql又没问题 经过一番查找问题,发现需要将数字使用CONVERT(number,char)函数转换字符类型连接. 2.MyBatis中 <if test="isfk != null and is…
DB数据源之SpringBoot+Mybatis踏坑过程实录系列(一)
DB数据源之SpringBoot+MyBatis踏坑过程(一) liuyuhang原创,未经允许进制转载 系列目录 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) DB数据源之SpringBoot+MyBatis踏坑过程(二)手工配置数据源与加载Mapper.xml扫描 DB数据源之SpringBoot+MyBatis踏坑过程(三)手工+半自动注解配置数据源与加载Mapper.xml扫描 DB数据源之SpringBoot+MyBatis踏坑过程(四)没有使用连接池的后果 DB…
DB数据源之SpringBoot+MyBatis踏坑过程(二)手工配置数据源与加载Mapper.xml扫描
DB数据源之SpringBoot+MyBatis踏坑过程(二)手工配置数据源与加载Mapper.xml扫描 liuyuhang原创,未经允许进制转载 吐槽之后应该有所改了,该方式可以作为一种过渡方式来使用. 系列目录连接 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) 1.环境说明 初次使用springboot,时间有限,需要迅速搭建好架构,没有时间研究 使用springboot过程中数据源无法获取: 使用springboot过程中注解莫名其妙失效: 用springbo…
DB数据源之SpringBoot+MyBatis踏坑过程(三)手工+半自动注解配置数据源与加载Mapper.xml扫描
DB数据源之SpringBoot+MyBatis踏坑过程(三)手工+半自动注解配置数据源与加载Mapper.xml扫描 liuyuhang原创,未经允许禁止转载 系列目录连接 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) 1.环境说明 Springboot初学者,需要学习手工配置数据源,不需要多数据源配置的情况下 建议使用本说明进行配置. springboot,parent 2.0.2.和1.5.3.都已经测试过, 在java8和java7环境下测试过.前者配java…
DB数据源之SpringBoot+MyBatis踏坑过程(四)没有使用连接池的后果
DB数据源之SpringBoot+MyBatis踏坑过程(四)没有使用连接池的后果 liuyuhang原创,未经允许禁止转载 系列目录连接 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) 1.环境说明 1.1.使用springboot手动获取数据源,其中数据源DataSource使用如下代码获取: DataSourceBuilder create = DataSourceBuilder.create(); ... DataSource source = create.bui…
DB数据源之SpringBoot+MyBatis踏坑过程(五)手动使用Hikari连接池
DB数据源之SpringBoot+MyBatis踏坑过程(五)手动使用Hikari连接池 liuyuhang原创,未经允许禁止转载 系列目录连接 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) 1.环境说明 springboot2.0以上版本,java8,myeclipse2017 C1,使用的是mySql数据库 pom <parent> <groupId>org.springframework.boot</groupId> <artifac…
DB数据源之SpringBoot+MyBatis踏坑过程(七)手动使用Tomcat连接池
DB数据源之SpringBoot+MyBatis踏坑过程(七)手动使用Tomcat连接池 liuyuhang原创,未经允许禁止转载 系列目录连接 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) 1.环境说明 springboot2.0以下版本,java7,myeclipse2017 C1,使用的是mySql数据库 pom <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="ht…
DB数据源之SpringBoot+MyBatis踏坑过程(六)mysql中查看连接,配置连接数量
DB数据源之SpringBoot+MyBatis踏坑过程(六)mysql中查看连接,配置连接数量 liuyuhang原创,未经允许禁止转载 系列目录连接 DB数据源之SpringBoot+Mybatis踏坑过程实录(一) 1.环境说明 mysql5.0以上版本. win平台cmd命令行访问 2.访问mysql数据库并查看连接状态 2.1.cmd-->进入mysql目录 说明:win64x的mysql64x版本默认安装目录会在C:\Program Files 下,32x版本会默认安装在C:\Pro…
记自己在mybatis中设置jdbcType的一个坑
项目是用ssm搭建的.主要是为app数据接口.其中有一个需求就app想要查询一段时间内某个用户的测量信息,所以app给我后端传递了3个参数,分别是appuserId(String),startDate(Date),endDate(Date).我在controller中验证参数没问题之后我将参数传递给service层,然后在service层传递给dao层,执行真正的sql语句查询. service层: Map<String, Object> conditionMap = new HashMap&…
初学者手册-MyBatis踩坑记(org.apache.ibatis.binding.BindingException)
1.参数绑定失败 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'msgs3' not found. Available parameters are [msgs, param1] 相关信息 <insert id="insertBatch"> INSERT INTO t_user (id…