⬆️ 适配 spring cloud alibaba 2021.0.1.0 config.import 导入配置文件
This commit is contained in:
1 parent
ca7bb696b3
commit
e430d79c81
19 files changed
+102
-86
No files matched your search
+4
-3
@@ -10,8 +10,9 @@ spring:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
-2
@@ -19,7 +19,6 @@ package com.pig4cloud.pigx.common.xss.config;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -31,7 +30,6 @@ import java.util.List;
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@RefreshScope
|
||||
@ConfigurationProperties(PigxXssProperties.PREFIX)
|
||||
public class PigxXssProperties {
|
||||
|
||||
|
||||
+5
-4
@@ -10,8 +10,9 @@ spring:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
active: @profiles.active@
|
||||
File renamed without changes.
+4
-3
@@ -10,8 +10,9 @@ spring:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
+4
-3
@@ -13,8 +13,9 @@ spring:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
+4
-3
@@ -10,9 +10,10 @@ spring:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+4
-3
@@ -10,8 +10,9 @@ spring:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
+4
-3
@@ -8,8 +8,9 @@ spring:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
@@ -3,6 +3,15 @@ server:
|
||||
servlet:
|
||||
encoding:
|
||||
force: true
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
server:
|
||||
port: 5020
|
||||
servlet:
|
||||
encoding:
|
||||
force: true
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
@@ -0,0 +1,20 @@
|
||||
server:
|
||||
port: 4040
|
||||
servlet:
|
||||
context-path: /sso1
|
||||
|
||||
security:
|
||||
oauth2:
|
||||
client:
|
||||
client-id: pig
|
||||
client-secret: pig
|
||||
user-authorization-uri: http://localhost:3000/oauth/authorize
|
||||
access-token-uri: http://localhost:3000/oauth/token
|
||||
scope: server
|
||||
resource:
|
||||
loadBalanced: true
|
||||
token-info-uri: http://localhost:3000/oauth/check_token
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
@@ -1,20 +1,20 @@
|
||||
server:
|
||||
port: 4040
|
||||
servlet:
|
||||
context-path: /sso1
|
||||
|
||||
security:
|
||||
oauth2:
|
||||
client:
|
||||
client-id: pig
|
||||
client-secret: pig
|
||||
user-authorization-uri: http://localhost:3000/oauth/authorize
|
||||
access-token-uri: http://localhost:3000/oauth/token
|
||||
scope: server
|
||||
resource:
|
||||
loadBalanced: true
|
||||
token-info-uri: http://localhost:3000/oauth/check_token
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#server:
|
||||
# port: 4040
|
||||
# servlet:
|
||||
# context-path: /sso1
|
||||
#
|
||||
#security:
|
||||
# oauth2:
|
||||
# client:
|
||||
# client-id: pig
|
||||
# client-secret: pig
|
||||
# user-authorization-uri: http://localhost:3000/oauth/authorize
|
||||
# access-token-uri: http://localhost:3000/oauth/token
|
||||
# scope: server
|
||||
# resource:
|
||||
# loadBalanced: true
|
||||
# token-info-uri: http://localhost:3000/oauth/check_token
|
||||
#
|
||||
#spring:
|
||||
# application:
|
||||
# name: @artifactId@
|
||||
@@ -1,3 +1,21 @@
|
||||
|
||||
server:
|
||||
port: 5004
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
main:
|
||||
allow-circular-references: true
|
||||
allow-circular-references: true
|
||||
@@ -1,17 +0,0 @@
|
||||
server:
|
||||
port: 5004
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_HOST:pigx-register}:${NACOS_PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
+4
-3
@@ -15,8 +15,9 @@ spring:
|
||||
management.context-path: ${server.servlet.context-path}/actuator
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:application-${spring.profiles.active}.yml
|
||||
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yml
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
@@ -35,7 +35,7 @@
|
||||
<properties>
|
||||
<spring-boot.version>2.6.4</spring-boot.version>
|
||||
<spring-cloud.version>2021.0.1</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
|
||||
<spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
@@ -67,11 +67,6 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--bootstrap 启动器-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
<!--配置文件处理器-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
Reference in new issue
Block a user