Merge branch 'feature/SUPPORT-9359' into develop
This commit is contained in:
commit
d494ea4c06
3 changed files with 7 additions and 11 deletions
|
|
@ -20,8 +20,8 @@ public abstract class AbstractIdmValidatorService implements IdmValidatorService
|
|||
protected RestTemplate restTemplate;
|
||||
protected SecurityContext securityContext;
|
||||
|
||||
@Value("${ervu.url}")
|
||||
protected String ervuUrl;
|
||||
@Value("${idm.url}")
|
||||
protected String idmUrl;
|
||||
|
||||
protected AbstractIdmValidatorService(RestTemplate restTemplate, SecurityContext securityContext) {
|
||||
this.restTemplate = restTemplate;
|
||||
|
|
@ -30,8 +30,7 @@ public abstract class AbstractIdmValidatorService implements IdmValidatorService
|
|||
|
||||
protected boolean checkExistsByQuery(String endpoint, String queryParamName, String queryParamValue) {
|
||||
URI uri = UriComponentsBuilder
|
||||
.fromHttpUrl(ervuUrl)
|
||||
.path(PathConstant.IDM_PATH)
|
||||
.fromHttpUrl(idmUrl)
|
||||
.pathSegment(PathConstant.PERSONS_PATH)
|
||||
.path(endpoint)
|
||||
.queryParam(queryParamName, queryParamValue)
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public class AccountFetchService implements EntityFetchService<Account> {
|
|||
private final RestTemplate restTemplate;
|
||||
private final ObjectMapper mapper;
|
||||
private final SecurityContext securityContext;
|
||||
@Value("${ervu.url}")
|
||||
private String ervuUrl;
|
||||
@Value("${idm.url}")
|
||||
private String idmUrl;
|
||||
@ObjectRef
|
||||
public EditableGridColumn editableGridColumnRef;
|
||||
|
||||
|
|
@ -77,8 +77,7 @@ public class AccountFetchService implements EntityFetchService<Account> {
|
|||
headers.setBearerAuth(securityContext.getToken());
|
||||
HttpEntity<SearchRequest> httpEntity = new HttpEntity<>(request, headers);
|
||||
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(ervuUrl)
|
||||
.path(PathConstant.IDM_PATH)
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(idmUrl)
|
||||
.pathSegment(PathConstant.ACCOUNTS_PATH, "search", "v1")
|
||||
.build()
|
||||
.toUri();
|
||||
|
|
@ -118,8 +117,7 @@ public class AccountFetchService implements EntityFetchService<Account> {
|
|||
}
|
||||
|
||||
private Account fetchAccountById(Object id) {
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(ervuUrl)
|
||||
.path(PathConstant.IDM_PATH)
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(idmUrl)
|
||||
.pathSegment(PathConstant.ACCOUNTS_PATH, id.toString(), "v1")
|
||||
.build()
|
||||
.toUri();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ package ru.micord.ervu.account_applications.service.constant;
|
|||
public final class PathConstant {
|
||||
public static final String ACCOUNTS_PATH = "accounts";
|
||||
public static final String PERSONS_PATH = "persons";
|
||||
public static final String IDM_PATH = "/service/idm";
|
||||
|
||||
private PathConstant() {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue