spring_reference/IV. Spring Boot features/35.4.2. EnvironmentTestUtil...

6 lines
283 B
Markdown
Raw Normal View History

2015-02-27 13:25:40 +00:00
### 35.4.2. EnvironmentTestUtils
EnvironmentTestUtils允许你快速添加属性到一个ConfigurableEnvironment或ConfigurableApplicationContext。只需简单的使用key=value字符串调用它
```java
EnvironmentTestUtils.addEnvironment(env, "org=Spring", "name=Boot");