Update 35.4.1. ConfigFileApplicationContextInitializer.md
parent
226b116934
commit
c8628a358e
|
@ -1,6 +1,7 @@
|
||||||
### 35.4.1. ConfigFileApplicationContextInitializer
|
### 35.4.1. ConfigFileApplicationContextInitializer
|
||||||
|
|
||||||
ConfigFileApplicationContextInitializer是一个ApplicationContextInitializer,可以用来测试加载Spring Boot的application.properties文件。当不需要使用@SpringApplicationConfiguration提供的全部特性时,你可以使用它。
|
ConfigFileApplicationContextInitializer是一个ApplicationContextInitializer,可以用来测试加载Spring Boot的application.properties文件。当不需要使用@SpringApplicationConfiguration提供的全部特性时,你可以使用它。
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@ContextConfiguration(classes = Config.class,
|
@ContextConfiguration(classes = Config.class,
|
||||||
initializers = ConfigFileApplicationContextInitializer.class)
|
initializers = ConfigFileApplicationContextInitializer.class)
|
||||||
|
|
Loading…
Reference in New Issue