1、fakecc删去发来掩码
2、c3pzff的url和sso的url动态配置 3、修改application-test从环境变量获取配置
This commit is contained in:
@@ -8,6 +8,7 @@ import com.realtime.protection.configuration.utils.enums.TaskTypeEnum;
|
||||
import com.realtime.protection.configuration.utils.enums.audit.AuditStatusEnum;
|
||||
import com.realtime.protection.server.command.CommandService;
|
||||
import com.realtime.protection.server.task.TaskService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
import org.springframework.web.reactive.function.client.WebClientResponseException;
|
||||
@@ -19,8 +20,11 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class StateHandler {
|
||||
|
||||
@Value("${c3.pzff.host}")
|
||||
private String c3_pzff;
|
||||
private final WebClient client = WebClient.builder()
|
||||
.baseUrl("http://192.168.107.49:8088")
|
||||
// .baseUrl("http://192.168.107.49:8088")
|
||||
.baseUrl("http://"+c3_pzff)
|
||||
.build();
|
||||
|
||||
protected Boolean handleStart(TaskService taskService, CommandService commandService, Long taskId) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.apache.logging.log4j.util.Strings;
|
||||
|
||||
import javax.security.auth.login.LoginException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@@ -27,6 +28,9 @@ public class LoginService {
|
||||
|
||||
private final LoginMapper loginMapper;
|
||||
|
||||
@Value("${sso.host}")
|
||||
private String HostSSO;
|
||||
|
||||
public LoginService(LoginMapper loginMapper) {
|
||||
this.loginMapper = loginMapper;
|
||||
}
|
||||
@@ -50,7 +54,7 @@ public class LoginService {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
Request request = new Request.Builder()
|
||||
.url("http://114.243.134.122:9217/passport/accessToken?grant_type=client_credentials")
|
||||
.url("http://" + HostSSO + "/passport/accessToken?grant_type=client_credentials")
|
||||
.header("Authorization", "Basic TlNBRERAWlguT1JHOk14a1hHZ1ltOUNROUE3TCRSOCNLRW02R1pSeEhwd1c2")
|
||||
.post(okhttp3.internal.Util.EMPTY_REQUEST)
|
||||
.build();
|
||||
@@ -74,7 +78,7 @@ public class LoginService {
|
||||
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
|
||||
.addFormDataPart("sessionData", sessionData).build();
|
||||
request = new Request.Builder()
|
||||
.url("http://114.243.134.122:9217/passport/accessApplication")
|
||||
.url("http://" + HostSSO + "/passport/accessApplication")
|
||||
.header("Authorization", "Bearer " + accessToken)
|
||||
.header("Content-Type", "application/x-www-form-urlencoded")
|
||||
.post(body)
|
||||
|
||||
Reference in New Issue
Block a user