一、Spring annotation
1.1 配置优先级覆盖
1.2 基于注解解耦合
1.3 多配置信息的整合
- @Import
- 扫描配置bean所在的包
- 创建工厂指定多个bean
1.4 跨配置注入
1.5 思维一体开发思想
-
基于schema
-
基于特定功能注解
-
基于原始
-
基于@bean
推荐:
<context:property-placeholder> @PropertySource <bean id ="" class ="PropertySourcePlaceCongure"> @Bean
1.6 纯注解AOP
步骤:
-
原始对象
-
创建切面
-
Spring 配置文件中
<aop:aspect-autoproxy/> @EnableAspectAutoProxy
细节:
-
Spring AOP 默认JDK
-
Spring boot 默认 Cglib