my-csc-config-file.git преди 5 години
родител
ревизия
0ff9f140c0
променени са 2 файла, в които са добавени 17 реда и са изтрити 7 реда
  1. 2 2
      pom.xml
  2. 15 5
      src/main/resources/application.yml

+ 2 - 2
pom.xml

@@ -24,10 +24,10 @@
24 24
             <artifactId>spring-cloud-config-server</artifactId>
25 25
         </dependency>
26 26
 
27
-        <!--<dependency>
27
+        <dependency>
28 28
             <groupId>org.springframework.cloud</groupId>
29 29
             <artifactId>spring-cloud-starter-bus-amqp</artifactId>
30
-        </dependency>-->
30
+        </dependency>
31 31
         <dependency>
32 32
             <groupId>org.springframework.boot</groupId>
33 33
             <artifactId>spring-boot-starter-actuator</artifactId>

+ 15 - 5
src/main/resources/application.yml

@@ -4,6 +4,7 @@ server:
4 4
 
5 5
 eureka:
6 6
   instance:
7
+#    hostname: 10.100.1.226 #地址
7 8
     hostname: 172.16.0.2 #地址
8 9
     prefer-ip-address: true
9 10
   client:
@@ -28,8 +29,17 @@ spring:
28 29
       # 分支
29 30
       label: master
30 31
   # 配置rabbitmq的地址以及用户密码
31
-#  rabbitmq:
32
-#    host: 172.16.0.46
33
-#    port: 5672
34
-#    username: admin
35
-#    password: admin
32
+  rabbitmq:
33
+    host: 172.16.0.2
34
+    port: 5672
35
+    username: admin
36
+    password: admin
37
+
38
+# 开放 bus-refresh 接口,以便配合 bus 实现 配置的动态刷新  http://10.100.1.226:9604/actuator/bus-refresh
39
+management:
40
+  endpoints:
41
+    web:
42
+      exposure:
43
+        include: bus-refresh
44
+
45
+