起因:今天练习 SpringBoot 下 Mybatis 使用的时候报了一个奇怪的错误 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): mapper.CustomerMapper.get ...
分类:
移动开发 时间:
2020-05-01 22:11:39
阅读次数:
378
Mybatis Plus 时间查询无效解决方法 错误写法 正确写法 使用 日期格式化类DateFormatUtils【org.apache.commons.lang3.time.DateFormatUtils】 query.apply("UNIX_TIMESTAMP(create_time) = U ...
分类:
其他好文 时间:
2020-05-01 16:42:00
阅读次数:
633
1,添加依赖 2,配置文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0/ ...
分类:
编程语言 时间:
2020-05-01 14:49:49
阅读次数:
73
代码生成器 MyBatis-Plus(简称 MP)是一个 MyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率而生。 步骤演示 一、添加mybatis plus依赖 <!--spring-boot web--> <dependency> <groupId>o ...
分类:
其他好文 时间:
2020-05-01 12:59:29
阅读次数:
55
一、环境搭建 1. 先搭好spring和Mybatis的整合的环境 2.导入Mapper的Maven依赖 <dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper</artifactId> <version>4.0.0-beta3</ ...
分类:
移动开发 时间:
2020-05-01 12:55:52
阅读次数:
91
MyBatis介绍 MyBatis 本是apache的一个开源项目iBatis, 2010年这个项目由apache software foundation 迁移到了google code,并且改名为MyBatis,实质上Mybatis对ibatis进行一些改进。 MyBatis是一个优秀的持久层框架 ...
分类:
其他好文 时间:
2020-05-01 11:01:21
阅读次数:
49
项目描述:在微信小程序中通过与Springboot操作数据库实现登录验证,其中我是用springboot整合mybatis-plus 和mysql操作数据库 1. 开发前准备 1.1 前置知识 java基础 SpringBoot简单基础知识 1.2 环境参数 开发工具:IDEA 基础环境:Maven ...
分类:
微信 时间:
2020-05-01 01:10:57
阅读次数:
87
搭建环境见: SpringBoot整合Shiro 一:搭建环境 shiro配置类见: SpringBoot整合Shiro 二:Shiro配置类 shiro整合Mybatis见:SpringBoot整合Shiro 三:整合Mybatis 认证 未授权时 ShiroConfig中添加授权访问 如果用户没 ...
分类:
编程语言 时间:
2020-04-30 23:13:14
阅读次数:
552
Map和模糊查询 在某些时候我们只需要给MyBatis传递几个参数而不是一个完整的对象,如仅仅update表中的两三个属性。此时parameterType设置为一个pojo显然不合适。可以考虑使用Map mapper.xml 测试类 模糊查询例子 1. mapper.xml 2. j接口 3. 测试 ...
分类:
其他好文 时间:
2020-04-30 19:30:45
阅读次数:
164
背景 我发现上传到github上的项目,有的有Example类,有的没有Example类,怎么回事呢? 过程 对比项目,发现/src/main/resources/mybatis/generatorConfig.xml 类不一样。 原因 targetRuntime="Mybatis" 和 targe ...
分类:
其他好文 时间:
2020-04-30 19:26:44
阅读次数:
153