如果加载的配置有重复的,它们的加载顺序是这样的,数字越小的优先级越高,即优先级高的覆盖优先级低的配置. Devtools global settings properties on your home directory (~/.spring-boot-devtools.properties when devtools is active). @TestPropertySource annotations on your tests. @SpringBootTest#properties ann
为什么称为暗执行顺序,因为当我们在new 对象时,其不是简简单单的new一个完事,它要首先检查父类的,静态的,非静态的等代码,就好像我们结婚生孩子一样,要先到祖宗那里,公安局那里,左邻右舍那里,告诉他们,我们要结婚了.下面来看其本质: 这里有一个父类一个子类: class Father{ { System.out.println("父类非静态代码块"); } static{ System.out.println("父类静态代码块"); } public Father