上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 100 下一页
摘要: 1、官网 https://docs.spring.io/spring/docs/5.2.7.RELEASE/spring-framework-reference/core.html#beans-dependencies 2、构造器注入(前面有) 3、Set方式注入(重点) A、依赖 : bean对象 阅读全文
posted @ 2020-07-18 20:39 市丸银 阅读(169) 评论(0) 推荐(0)
摘要: 1、别名 <alias name="" alias=""/> name 原名 alias 别名 2、beans <bean id="teacher" class="com.wt.pojo.Teacher" name="t1 t2"> id 在IOC容器的名称, class 对应的类, name 对应 阅读全文
posted @ 2020-07-18 19:28 市丸银 阅读(134) 评论(0) 推荐(0)
摘要: 一、无参构造函数 <bean id="user" class="com.wt.pojo.User"> <property name="name" value="tom"/> </bean> 二、含参构造函数 1、通过 name 键值对 <bean id="teacher" class="com.wt 阅读全文
posted @ 2020-07-18 19:12 市丸银 阅读(204) 评论(0) 推荐(0)
摘要: IOC: 由spring 进行创建、管理、配置 官网:https://docs.spring.io/spring/docs/5.2.7.RELEASE/spring-framework-reference/core.html#beans-child-bean-definitions 一个简单的例子 阅读全文
posted @ 2020-07-18 17:54 市丸银 阅读(161) 评论(0) 推荐(0)
摘要: https://docs.spring.io/spring/docs/5.2.7.RELEASE/spring-framework-reference/core.html#spring-core IOC:控制反转 理解: 原本一个程序的控制权在程序员手中,用户修改功能需要程序员修改 IOC用户现在本 阅读全文
posted @ 2020-07-18 17:10 市丸银 阅读(133) 评论(0) 推荐(0)
摘要: 一、网址 文档: https://spring.io/projects/spring-framework 资源下载: https://repo.spring.io/release/org/springframework/spring/ maven 下载 spring-webmvc spring jd 阅读全文
posted @ 2020-07-18 16:00 市丸银 阅读(188) 评论(0) 推荐(0)
摘要: 作用:ehcache主要用于缓存 过程: 1、maven(导包) mybatis-ehcache 2、定义cache <cache type="org.mybatis.caches.ehcache.EhcacheCache"/> 其它参考 https://www.cnblogs.com/myseri 阅读全文
posted @ 2020-07-18 15:31 市丸银 阅读(190) 评论(0) 推荐(0)
摘要: 加快查找 一、一级缓存(sqlSession) 失去缓存的情况 1、查询不同的语句 2、增删改操作,可能会改变原来的数据,所以缓存必定刷新 3、查询不同的Mapper.xml 4、手动清理缓存 sqlSession.clearCache(); 注意:一级缓存默认开启,而且去不掉,在sqlSessio 阅读全文
posted @ 2020-07-18 15:12 市丸银 阅读(143) 评论(0) 推荐(0)
摘要: 一、本质 动态sql是,在sql语句添加逻辑语句 官网:https://mybatis.org/mybatis-3/zh/dynamic-sql.html (看官网足够)) 二、if 1、接口类 List<Blog> getBlogInfo(Map<String, Object> map); 2、x 阅读全文
posted @ 2020-07-18 13:33 市丸银 阅读(162) 评论(0) 推荐(0)
摘要: 主意:每次从官网添加 xml映射文件时要修改namespace,xml配置文件别忘添加啊mapper 一、搭建环境 注意: 1、多个javaBean时,xml映射文件,储存到rescourse 文件下, 与dao文件同名和同级下 2、xml映射文件,别忘记修改 namespace 3、xml配置文件 阅读全文
posted @ 2020-07-17 22:21 市丸银 阅读(454) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 100 下一页