diff --git a/docker-springboot/Dockerfile b/docker-springboot/Dockerfile index 71abc60..2eb81cd 100644 --- a/docker-springboot/Dockerfile +++ b/docker-springboot/Dockerfile @@ -11,8 +11,7 @@ COPY realtime_protection realtime_protection # DORIS_URL="10.58.72.135:9030"\ # KAFKA_SERVERS="10.58.72.125:9092,10.58.72.126:9092,10.58.72.127:9092,10.58.72.128:9092,10.58.72.129:9092,\ # 10.58.72.130:9092,10.58.72.131:9092,10.58.72.132:9092,10.58.72.133:9092,10.58.72.134:9092" -# C3_PZFF_HOST="10.58.72.151:8088"\ -# SSO_HOST='https://passport.iam.pub' + ENV MYSQL_USERNAME="root" \ MYSQL_PASSWD="aiihhbfcsy123!@#" \ @@ -21,8 +20,7 @@ ENV MYSQL_USERNAME="root" \ DORIS_PASSWD="" \ DORIS_URL="10.26.22.133:9030"\ KAFKA_SERVERS="172.29.128.1:9092"\ - C3_PZFF_HOST="192.168.107.49:8088"\ - SSO_HOST='114.243.134.122:9217' + EXPOSE 8081 diff --git a/src/main/java/com/realtime/protection/server/task/status/StateHandler.java b/src/main/java/com/realtime/protection/server/task/status/StateHandler.java index 9550479..68e9844 100644 --- a/src/main/java/com/realtime/protection/server/task/status/StateHandler.java +++ b/src/main/java/com/realtime/protection/server/task/status/StateHandler.java @@ -20,11 +20,10 @@ 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://"+c3_pzff) + .baseUrl("http://192.168.107.49:8088") +// .baseUrl("http://10.58.72.151:8088") .build(); protected Boolean handleStart(TaskService taskService, CommandService commandService, Long taskId) { diff --git a/src/main/java/com/realtime/protection/server/user/login/LoginService.java b/src/main/java/com/realtime/protection/server/user/login/LoginService.java index 08e881c..4eefae8 100644 --- a/src/main/java/com/realtime/protection/server/user/login/LoginService.java +++ b/src/main/java/com/realtime/protection/server/user/login/LoginService.java @@ -28,9 +28,6 @@ public class LoginService { private final LoginMapper loginMapper; - @Value("${sso.host}") - private String HostSSO; - public LoginService(LoginMapper loginMapper) { this.loginMapper = loginMapper; } @@ -54,7 +51,8 @@ public class LoginService { ObjectMapper objectMapper = new ObjectMapper(); OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() - .url("http://" + HostSSO + "/passport/accessToken?grant_type=client_credentials") + .url("http://114.243.134.122:9217/passport/accessToken?grant_type=client_credentials") +// .url("https://passport.iam.pub/passport/accessToken?grant_type=client_credentials") .header("Authorization", "Basic TlNBRERAWlguT1JHOk14a1hHZ1ltOUNROUE3TCRSOCNLRW02R1pSeEhwd1c2") .post(okhttp3.internal.Util.EMPTY_REQUEST) .build(); @@ -78,7 +76,9 @@ public class LoginService { RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("sessionData", sessionData).build(); request = new Request.Builder() - .url("http://" + HostSSO + "/passport/accessApplication") + .url("http://114.243.134.122:9217/passport/accessApplication") +// .url("https://passport.iam.pub/passport/accessToken?grant_type=client_credentials") + .header("Authorization", "Bearer " + accessToken) .header("Content-Type", "application/x-www-form-urlencoded") .post(body) diff --git a/src/main/resources/config/application-test.yml b/src/main/resources/config/application-test.yml index 6dca1de..5dbc737 100644 --- a/src/main/resources/config/application-test.yml +++ b/src/main/resources/config/application-test.yml @@ -131,10 +131,3 @@ management: endpoint: shutdown: enabled: true - -c3: - pzff: - host: ${C3_PZFF_HOST} -sso: - host: ${SSO_HOST} -