瀏覽代碼

新增 nacos注册配置

guoenzhou 3 年之前
父節點
當前提交
06dd77f3bc
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 6 0
      fiveep-controller/pom.xml
  2. 4 1
      fiveep-controller/src/main/resources/application-dev.properties

+ 6 - 0
fiveep-controller/pom.xml

@@ -16,6 +16,12 @@
     </parent>
 
     <dependencies>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+            <version>2021.1</version>
+        </dependency>
+
         <dependency>
             <groupId>com.bizmatics</groupId>
             <artifactId>fiveep-service</artifactId>

+ 4 - 1
fiveep-controller/src/main/resources/application-dev.properties

@@ -84,6 +84,9 @@ spring.redis.jedis.pool.max-idle=300
 spring.redis.jedis.pool.min-idle=5
 spring.redis.jedis.pool.max-wait=1000
 
+spring.application.name=usky-power
+spring.cloud.nacos.discovery.server-addr=usky-cloud-nacos:8848
+
 # token
 token.header: accessToken
 token.secret: abcdefghijklmnopqrstuvwxyz
@@ -102,4 +105,4 @@ wj.demoEnabled: true
 wj.addressEnabled: false
 wj.captchaType: math
 
-spring.messages.basename= i18n/messages
+spring.messages.basename= i18n/messages