天道酬勤,学无止境

常用注解

常用注解使用总结系列: @Order 注解

@Order 注解 @Order注解主要用来控制配置类的加载顺序示例代码: package com.runlion.tms.admin.constant; public class AService { } package com.runlion.tms.admin.constant; public class BService { } package com.runlion.tms.admin.constant; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; @Configuration @Order(2) public class AConfig { @Bean public AService AService() { System.out.println("AService 加载了"); return new AService(); } } package com.runlion.tms.admin.constant; import org.springframework.context

2021-05-18 21:05:15    分类:博客    程序开发   常用注解