上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 100 下一页
摘要: <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> </dependency> <dependency> <groupId>org.sp 阅读全文
posted @ 2020-07-19 18:37 市丸银 阅读(123) 评论(0) 推荐(0)
摘要: 保证数据的一致性和完整性 官网:http://mybatis.org/spring/zh/transactions.html 声明式事务 spring中配置声明事务 <!--配置声明事务--> <bean id="transactionManager" class="org.springframew 阅读全文
posted @ 2020-07-19 17:26 市丸银 阅读(133) 评论(0) 推荐(0)
摘要: 官网: http://mybatis.org/spring/zh/getting-started.html 过程 1、导入jar包 junit mybatis mysql spring aop mybatis-spring 2、编写配置文件 3、测试 二、过程 1、maven <!-- 依赖--> 阅读全文
posted @ 2020-07-19 16:25 市丸银 阅读(157) 评论(0) 推荐(0)
摘要: 三种方式 第二个比较好 导入包 <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjw 阅读全文
posted @ 2020-07-19 14:01 市丸银 阅读(165) 评论(0) 推荐(0)
摘要: 注意:动态代理代理的是接口 一、过程 1、接口类 2、普通类继承接口 3、ProxyInvocationHandler.java(固定格式) 4、应用类 二、案例 public interface User { void add(); void delete(); void update(); vo 阅读全文
posted @ 2020-07-19 11:58 市丸银 阅读(184) 评论(0) 推荐(0)
摘要: 官网:https://docs.spring.io/spring/docs/5.2.7.RELEASE/spring-framework-reference/core.html#beans-java javaConfig 阅读全文
posted @ 2020-07-18 23:43 市丸银 阅读(132) 评论(0) 推荐(0)
摘要: 一、环境 1、导入包 maven 2、xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3. 阅读全文
posted @ 2020-07-18 23:25 市丸银 阅读(129) 评论(0) 推荐(0)
摘要: 官网:https://docs.spring.io/spring/docs/5.2.7.RELEASE/spring-framework-reference/core.html#beans-annotation-config 1、导入约束 2、配置注解支持 <?xml version="1.0" e 阅读全文
posted @ 2020-07-18 22:52 市丸银 阅读(167) 评论(0) 推荐(0)
摘要: 两种方式 byName:自动查找容器上下文,set方法名 与 bean id 名相同 byType: 自动查找容器上下文, class名称与类名相同 案例 人有猫和狗 1、pojo cat.java package com.wt.pojo; public class Cat { public voi 阅读全文
posted @ 2020-07-18 22:29 市丸银 阅读(151) 评论(0) 推荐(0)
摘要: ScopeDescription singleton (Default) Scopes a single bean definition to a single object instance for each Spring IoC container. prototype Scopes a sin 阅读全文
posted @ 2020-07-18 21:53 市丸银 阅读(140) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 100 下一页