Commit 236a8188c471a30a8657dd78be653ffd9acaef79

Authored by 陶汉栋
1 parent 8730ae47
Exists in master

注册服务增加bootstrap.yml,防止主动监听到8080端口

cloud/getaway/src/main/resources/application.yml
@@ -29,8 +29,8 @@ spring: @@ -29,8 +29,8 @@ spring:
29 filters: 29 filters:
30 - StripPrefix=1 30 - StripPrefix=1
31 - id: file-center 31 - id: file-center
32 - uri: lb://file-center  
33 -# uri: http://121.40.30.78:5000 32 +# uri: lb://file-center
  33 + uri: http://121.40.30.78:5000
34 predicates: 34 predicates:
35 - Path=/file-center/** 35 - Path=/file-center/**
36 filters: 36 filters:
@@ -52,4 +52,7 @@ ribbon: @@ -52,4 +52,7 @@ ribbon:
52 ConnectTimeout: 90000 52 ConnectTimeout: 90000
53 OkToRetryOnAllOperations: true 53 OkToRetryOnAllOperations: true
54 MaxAutoRetries: 1 54 MaxAutoRetries: 1
55 - MaxAutoRetriesNextServer: 1  
56 \ No newline at end of file 55 \ No newline at end of file
  56 + MaxAutoRetriesNextServer: 1
  57 +
  58 +url:
  59 + ignored: /SmartCampusWebApi/**
57 \ No newline at end of file 60 \ No newline at end of file
cloud/getaway/src/main/resources/bootstrap.yml
1 #端口 1 #端口
2 server: 2 server:
3 port: 8083 3 port: 8083
  4 +# address: sincere.myjxt.com
4 5
5 #服务名称 6 #服务名称
6 spring: 7 spring:
cloud/server1/src/main/resources/application.yaml
1 -server:  
2 - port: 8761  
3 -  
4 -spring:  
5 - application:  
6 - name: eureka-server1  
7 - profiles:  
8 - active: dev  
9 -  
10 eureka: 1 eureka:
11 instance: 2 instance:
12 # 注册周期心跳 默认30s 这里改成5s 建议生成环境使用默认值30 3 # 注册周期心跳 默认30s 这里改成5s 建议生成环境使用默认值30
cloud/server1/src/main/resources/bootstrap.yml 0 → 100644
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
  1 +#端口
  2 +server:
  3 + port: 8761
  4 +# address: sincere.myjxt.com
  5 +
  6 +#服务名称
  7 +spring:
  8 + application:
  9 + name: eureka-server1
  10 + main:
  11 + allow-bean-definition-overriding: true
  12 +
  13 +
  14 +management:
  15 + endpoints:
  16 + web:
  17 + exposure:
  18 + include: "*"
  19 + endpoint:
  20 + health:
  21 + show-details: always
  22 +
  23 +
  24 +
0 \ No newline at end of file 25 \ No newline at end of file
cloud/server2/src/main/resources/bootstrap.yml 0 → 100644
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
  1 +#端口
  2 +server:
  3 + port: 8762
  4 +# address: sincere.myjxt.com
  5 +
  6 +#服务名称
  7 +spring:
  8 + application:
  9 + name: eureka-server2
  10 + main:
  11 + allow-bean-definition-overriding: true
  12 +
  13 +
  14 +management:
  15 + endpoints:
  16 + web:
  17 + exposure:
  18 + include: "*"
  19 + endpoint:
  20 + health:
  21 + show-details: always
  22 +
  23 +
  24 +
0 \ No newline at end of file 25 \ No newline at end of file