- 博客(3)
- 收藏
- 关注
原创 aop配置代理笔记
AOP概念:采用横向抽取机制,取代了传统纵向继承体系的重复性代码,一般可以用在:性能监控,事务管理,安全检查,缓存等方面SpringAOP使用纯java实现,不需要专门的编译过程和类加载,在运行期通过代理方式向目标类织入增强的代码joinpoint(连接点):指那些被拦截到的点,在spring中,这些点指的是方法,因为spring只支持方法类型的连接点pointcut(切入点):所有切入点是指需要对那些joinpoint进行拦截advice(通知/增强):所谓通知就是拦截到joinpoint之后需要
2020-06-29 19:05:47
160
原创 Spring的注解开发模式
四个常用的注解:注意点:1、使用注解开发,在头部要引用下面这个约束xmlns:context=“http://www.springframework.org/schema/context” xsi:schemaLocation="2、要开启注解扫描:<context:component-scan base-package=“com.demo.ioc.demo1”/> 开启包扫描,包含属性注入的方式开启context:annotation-config</context:anno
2020-06-28 17:52:35
149
1
原创 **在spring中bean中注入复杂的属性**
对应的实现类:public class Complex {private String[] arr;private List list;private Set set;private Map map;private Properties properties;} <property name="arr"> <list> <value>name</value> <valu
2020-06-28 15:25:50
120
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人