mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
修改网关serviceId
This commit is contained in:
@@ -30,7 +30,7 @@ import java.util.stream.Stream;
|
||||
public class ConfigPushService {
|
||||
|
||||
private static final String GATEWAY_PUSH_URL = "http://%s/configChannelMsg";
|
||||
private static final String API_GATEWAY_SERVICE_ID = "api-gateway";
|
||||
private static final String API_GATEWAY_SERVICE_ID = "sop-gateway";
|
||||
|
||||
private static HttpTool httpTool = new HttpTool();
|
||||
|
||||
|
@@ -185,8 +185,8 @@ public class AbstractConfiguration implements ApplicationContextAware {
|
||||
throw new IllegalArgumentException("RouteRepositoryContext.setRouteRepository()方法未使用");
|
||||
}
|
||||
String serverName = EnvironmentKeys.SPRING_APPLICATION_NAME.getValue();
|
||||
if (!"api-gateway".equals(serverName)) {
|
||||
throw new IllegalArgumentException("spring.application.name必须为api-gateway");
|
||||
if (!"sop-gateway".equals(serverName)) {
|
||||
throw new IllegalArgumentException("spring.application.name必须为sop-gateway");
|
||||
}
|
||||
String urlencode = EnvironmentKeys.SIGN_URLENCODE.getValue();
|
||||
if ("true".equals(urlencode)) {
|
||||
|
@@ -22,7 +22,7 @@ public abstract class BaseRegistryListener implements RegistryListener {
|
||||
public static List<String> EXCLUDE_SERVICE_ID_LIST = new ArrayList<>(8);
|
||||
|
||||
static {
|
||||
EXCLUDE_SERVICE_ID_LIST.add("api-gateway");
|
||||
EXCLUDE_SERVICE_ID_LIST.add("sop-gateway");
|
||||
EXCLUDE_SERVICE_ID_LIST.add("website-server");
|
||||
}
|
||||
|
||||
|
@@ -54,11 +54,6 @@
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 使用nacos注册中心
|
||||
版本 0.2.x.RELEASE 对应的是 Spring Boot 2.x 版本,版本 0.1.x.RELEASE 对应的是 Spring Boot 1.x 版本。
|
||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-alibaba-nacos-discovery
|
||||
|
@@ -1,6 +1,6 @@
|
||||
server.port=8081
|
||||
# 固定不变
|
||||
spring.application.name=api-gateway
|
||||
spring.application.name=sop-gateway
|
||||
|
||||
# ------- 需要改的配置 -------
|
||||
# mysql数据库账号
|
||||
|
Reference in New Issue
Block a user