Skip to content

Commit c3ae83a

Browse files
committed
sunnychan
1 parent 37d7e2c commit c3ae83a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

spring-cookbook/src/test/java/me/sunny/demo/spring/cookbook/TestSpringEnv.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
package me.sunny.demo.spring.cookbook;
2-
3-
import java.util.HashMap;
4-
import java.util.Iterator;
5-
import java.util.Map;
6-
72
import com.alibaba.fastjson.JSON;
83

94
import org.junit.Test;
105
import org.junit.runner.RunWith;
116
import org.springframework.beans.factory.annotation.Autowired;
127
import org.springframework.core.env.Environment;
13-
import org.springframework.core.env.PropertySource;
148
import org.springframework.test.context.ContextConfiguration;
159
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
16-
import org.springframework.web.context.support.StandardServletEnvironment;
10+
11+
/**
12+
* 测试获取Spring的环境变量、配置信息
13+
*/
1714

1815
@RunWith(SpringJUnit4ClassRunner.class)
1916
@ContextConfiguration({"classpath:spring.xml"})

spring-cookbook/src/test/java/me/sunny/demo/spring/cookbook/TestSpringWebEnv.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
import org.springframework.test.context.web.WebAppConfiguration;
1717
import org.springframework.web.context.support.StandardServletEnvironment;
1818

19+
/**
20+
* 测试获取Spring Web 的环境变量、配置信息
21+
*/
22+
1923
@RunWith(SpringJUnit4ClassRunner.class)
2024
@WebAppConfiguration
2125
@ContextConfiguration({"classpath:spring.xml"})

0 commit comments

Comments
 (0)