手机号授权: ouath2增加测试用例、追加日志输出
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package servicetest;
|
||||
|
||||
import com.accompany.oauth2.OAuth2Application;
|
||||
import com.accompany.oauth2.service.MyUserDetailsService;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = OAuth2Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class CommonTest {
|
||||
|
||||
@Autowired
|
||||
private MyUserDetailsService myUserDetailsService;
|
||||
|
||||
@Test
|
||||
public void getUserClanInfoTest() {
|
||||
|
||||
try {
|
||||
myUserDetailsService.loadUserByPhone("8615626451870","86","111111",null,"127.0.0.1");
|
||||
myUserDetailsService.loadUserByPhone("8615626451870","86","122211",null,"127.2.2.1");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user