SpringBoot启动加载类ApplicationRunner 有时希望项目在启动的时候加载一些系统参数,就要用到ApplicationRunner ApplicationRunner是一个接口,我们需要实现它,并重写run()方法,当项目启动时,run()方法便会自动执行 @Component @Order(value=1) public class StartLoader implements ApplicationRunner { @Override public void run(Ap
参考官方文档:https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html Spring Boot uses a very particular PropertySource order that is designed to allow sensible overriding of values. Properties are considered in the