上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 48 下一页
摘要: 1.创建项目,打包方式设置为war 2.配置web.xml路径:D:\Code\spring\ssm2023\ssm2023\spring_mvc\src\main\webapp\WEB-INF\web.xml 3.引入pom依赖 <project xmlns="http://maven.apach 阅读全文
posted @ 2023-03-05 19:21 iTao0128 阅读(31) 评论(0) 推荐(0)
摘要: 引入依赖 <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>5.2.0</version> </dependency> mybatis-config.x 阅读全文
posted @ 2023-03-05 12:30 iTao0128 阅读(239) 评论(0) 推荐(0)
摘要: 一级缓存 二级缓存 二级缓存相关配置 mybatis缓存查询的顺序 阅读全文
posted @ 2023-03-04 19:41 iTao0128 阅读(13) 评论(0) 推荐(0)
摘要: mapper接口 Emp getEmpById(@Param("id") Integer id); mapper.xml <!-- sql片段:可以记录一段sql,在需要用的地方使用include标签进行引用 --> <sql id="empColumns"> emp_id,emp_name,age 阅读全文
posted @ 2023-03-03 23:03 iTao0128 阅读(43) 评论(0) 推荐(0)
摘要: <!-- 【foreach标签】 collection:设置要循环的数组或集合 item:用一个字符串表示数组或集合中的每一个数据 separator:设置每次循环的数据之间的分隔符 open:循环的所有内容以什么开始 close:循环的所有内容以什么结束 --> mapper接口 public i 阅读全文
posted @ 2023-03-03 22:54 iTao0128 阅读(1392) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <m 阅读全文
posted @ 2023-03-03 21:56 iTao0128 阅读(364) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <m 阅读全文
posted @ 2023-03-03 21:41 iTao0128 阅读(64) 评论(0) 推荐(0)
摘要: mapper接口 public interface EmpMapper { List<Emp> getEmp(Emp emp); } mapper.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//myba 阅读全文
posted @ 2023-03-03 21:28 iTao0128 阅读(428) 评论(0) 推荐(0)
摘要: 实体类 package org.example.entity; import java.util.List; public class Dept { private Integer deptId; private String deptName; private List<Emp> emps; pu 阅读全文
posted @ 2023-03-02 22:47 iTao0128 阅读(78) 评论(0) 推荐(0)
摘要: mybatis懒加载全局配置 <settings> <setting name="mapUnderscoreToCamelCase" value="true"/> <!--开启懒加载(开启延迟加载)--> <setting name="lazyLoadingEnabled" value="true" 阅读全文
posted @ 2023-03-02 22:26 iTao0128 阅读(108) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 48 下一页