java
文章平均质量分 69
qq_25986311
这个作者很懒,什么都没留下…
展开
-
Spring @Enable 模块装配
Spring Framework 3.1 开始支持”@Enable 模块驱动“。所谓“模块”是指具备相同领域的功能组件集合, 组合所形成一个独立的单元。比如 Web MVC 模块、AspectJ代理模块、Caching(缓存)模块、JMX(Java 管 理扩展)模块、Async(异步处理)模块等。 自定义 @Enable 模块 基于注解驱动实现 - @EnableHelloWorld ...原创 2018-10-20 09:59:08 · 162 阅读 · 0 评论 -
Spring 条件装配
条件注解举例 @Profile 配置化条件装配 @Conditional 编程条件装配 先自定义 属性类 @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD }) @Documented @Conditional(OnSystemPropertyCondition.class)//...原创 2018-10-20 10:43:48 · 206 阅读 · 0 评论 -
Spring Boot 自动装配
底层装配技术 Spring 模式注解装配 Spring @Enable 模块装配 Spring 条件装配装配 Spring 工厂加载机制 实现类: SpringFactoriesLoader 配置资源: META-INF/spring.factories 自定义实现 自动装配 @Configuration @EnableHelloWorld // 开启自动装配的注解 @Conditi...原创 2018-10-20 10:50:25 · 130 阅读 · 0 评论