mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add CharSequenceUtil
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Spring相关工具封装
|
||||
*
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
package cn.hutool.extra.spring;
|
@@ -10,15 +10,15 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
* @author sidian
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = EnableSprintUtilTest.class)
|
||||
@SpringBootTest(classes = EnableSpringUtilTest.class)
|
||||
@EnableSpringUtil
|
||||
public class EnableSprintUtilTest {
|
||||
public class EnableSpringUtilTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
// 使用@EnableSpringUtil注解后, 能获取上下文
|
||||
Assert.assertNotNull(SpringUtil.getApplicationContext());
|
||||
// 不使用时, 为null
|
||||
@Test
|
||||
public void test() {
|
||||
// 使用@EnableSpringUtil注解后, 能获取上下文
|
||||
Assert.assertNotNull(SpringUtil.getApplicationContext());
|
||||
// 不使用时, 为null
|
||||
// Assert.assertNull(SpringUtil.getApplicationContext());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user