Bläddra i källkod

修复 message-service 中引入的环境变量名

reghao 1 vecka sedan
förälder
incheckning
50511230a1

+ 2 - 3
message/message-service/src/main/java/cn/reghao/tnb/message/app/config/SpringLifecycle.java

@@ -32,11 +32,10 @@ public class SpringLifecycle implements ApplicationRunner, DisposableBean {
         Set<String> ipv4AddressSet = getAddress();
         // 通过 vm option -Dserver.address=192.168.0.10 指定
         String serverAddress1 = System.getProperty("server.address");
-        // 通过环境变量 SERVER_ADDRESS=192.168.0.10 指定时端口会绑定到该地址, 只会监听 192.168.0.10:6002
-        // 通过环境变量 NODE_ADDRESS=192.168.0.10 指定
+        // 通过环境变量 NODE_ADDRESS=192.168.0.10 指定时端口会绑定到该地址, 只会监听 192.168.0.10:6002
         String serverAddress = System.getenv("NODE_ADDRESS");
         if (!ipv4AddressSet.contains(serverAddress)) {
-            log.error("没有通过环境变量 SERVER_ADDRESS 指定地址, 或是指定的地址不是机器地址 {}, 结束 MessageService 进程...", ipv4AddressSet);
+            log.error("没有通过环境变量 NODE_ADDRESS 指定地址, 或是指定的地址不是机器地址 {}, 结束 MessageService 进程...", ipv4AddressSet);
             System.exit(SpringApplication.exit(applicationContext));
         }