代码调整

This commit is contained in:
2023-06-15 16:01:50 +08:00
parent d9468d2c5e
commit 4350a2c342
22 changed files with 720 additions and 42 deletions

View File

@@ -26,16 +26,14 @@ public class AuthTest extends BaseJunitTest {
@SneakyThrows
@Test
public void test(){
String userUrl = "http://127.0.0.1:10214/oauth/token";
String userUrl = "http://127.0.0.1:10215/pqs-auth/oauth/token";
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(userUrl)
.queryParam("grant_type", "password")
.queryParam("client_id", "njcn_app")
.queryParam("client_id", "njcn")
.queryParam("client_secret", "njcnpqs")
.queryParam("username", "root")
.queryParam("password", "@#001njcnpqs");
URI uri = builder.build().encode().toUri();
JSONObject jsonObject = new JSONObject();
jsonObject.set("","");
ResponseEntity<OAuth2AccessToken> userEntity = RestTemplateUtil.post(uri, OAuth2AccessToken.class);
}