摘要:
thymeleaf 依赖 <groupId>org.thymeleaf</groupId> <artifactId>thymeleaf-spring5</artifactId> <version>3.0.11.RELEASE</version> </dependency> <dependency> 阅读全文
摘要:
mybatis(十)缓存 缓存原理图: 自定义缓存 <?xml version="1.0" encoding="UTF-8"?> <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchem 阅读全文
摘要:
mybatis(八)复杂查询 8.1多对一 8.1.1准备相应的表 学生表 CREATE TABLE `student` ( `id` int(10) NOT NULL, `name` varchar(30) DEFAULT NULL, `tid` int(10) DEFAULT NULL, PRI 阅读全文
摘要:
mybatis(六)分页 6.1 原生sql 语句 select * from user_k uk limit 1,2; select * from user_k uk limit 2; #[0,2] 6.2 使用mybatis实现分页 6.2.1 编写接口 List<UserK> getUsers 阅读全文
摘要:
mybatis(九)动态SQL 9.1 准备 表 CREATE TABLE `blog` ( `id` varchar(50) NOT NULL COMMENT '博客id', `title` varchar(100) NOT NULL COMMENT '博客标题', `author` varcha 阅读全文
摘要:
mybatis(七)只用注解开发 7.1编写接口 UserK queryuserkbyid(@Param("id") Integer id); 7.2编写注解 @Select("select * from mybatis.user_k where id=#{id} ") 其中需要注意的点 7.3测试 阅读全文
摘要:
mybatis(五) 日志 1.Mybatis 日志 通过使用内置的日志工厂提供日志功能。内置日志工厂将会把日志工作委托给下面的实现之一: SLF4J Apache Commons Logging Log4j 2 Log4j JDK logging 具体使用哪一个 在设置中进行设置就行 在配置文件中 阅读全文
摘要:
# 将日志按照包分类输出的配置文件 #################################################### #根针对所有的日志包 log4j.rootLogger = debug , appendConsole #下面两个配置是指定包的特殊处理,针对两个指定的日志级 阅读全文
摘要:
mybatis()中可能出现的问题 1.解决字段名和数据库中的不一致导致的问题 前提因素: 而我们的 实体类中 这就导致我们再查询的时候 查询出来的 passwd 为null 解决办法 使用 resultMap 阅读全文
摘要:
MyBatis(三) 配置解析 1.核心配置 configuration(配置) properties(属性) settings(设置) typeAliases(类型别名) typeHandlers(类型处理器) objectFactory(对象工厂) plugins(插件) environment 阅读全文