You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
549 B
Java
22 lines
549 B
Java
4 years ago
|
package me.zhengjie;
|
||
|
|
||
|
import me.zhengjie.utils.SecurityUtils;
|
||
|
import org.junit.Test;
|
||
|
import org.junit.runner.RunWith;
|
||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||
|
|
||
|
@RunWith(SpringRunner.class)
|
||
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||
|
public class SpringApplicationTest {
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 获取当前的用户信息
|
||
|
*/
|
||
|
@Test
|
||
|
public void testGetName(){
|
||
|
System.out.println(SecurityUtils.getCurrentUsername());
|
||
|
}
|
||
|
}
|