✨ 添加新特性。支持nacos
This commit is contained in:
1 parent
4901c2974e
commit
e935fa3d72
304 files changed
+51587
-710
No files matched your search
+6
-1
@@ -33,10 +33,15 @@
|
||||
<description>pigx 认证授权中心,基于 spring security oAuth2</description>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--upms api、model 模块-->
|
||||
<dependency>
|
||||
|
||||
@@ -5,20 +5,12 @@ spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-nacos}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
active: dev
|
||||
Reference in new issue
Block a user