调整nacos配置中心

This commit is contained in:
2023-11-28 11:49:11 +08:00
parent b98a4954ad
commit 69195be5ef
47 changed files with 352 additions and 508 deletions

View File

@@ -3,3 +3,4 @@ LABEL authors="yovinchen"
VOLUME /tmp
ADD ./target/service-gateway.jar service-gateway.jar
ENTRYPOINT ["java","-jar","/service-gateway.jar", "&"]

View File

@@ -22,6 +22,10 @@
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>

View File

@@ -1,59 +0,0 @@
server:
port: 8200
spring:
cloud:
gateway:
discovery:
locator:
enabled: true
routes:
- id: service-acl
uri: lb://service-acl
predicates:
- Path=/*/acl/**
- id: service-sys
uri: lb://service-sys
predicates:
- Path=/*/sys/**
- id: service-product
uri: lb://service-product
predicates:
- Path=/*/product/**
- id: service-activity
uri: lb://service-activity
predicates:
- Path=/*/activity/**
- id: service-order
uri: lb://service-order
predicates:
- Path=/*/order/**
- id: service-payment
uri: lb://service-payment
predicates:
- Path=/*/payment/**
- id: service-user
uri: lb://service-user
predicates:
- Path=/*/user/**
- id: service-search
uri: lb://service-search
predicates:
- Path=/*/search/**
- id: service-home
uri: lb://service-home
predicates:
- Path=/*/home/**
- id: service-cart
uri: lb://service-cart
predicates:
- Path=/*/cart/**

View File

@@ -1,8 +1,8 @@
server:
port: 8200
spring:
application:
name: service-gateway
profiles:
active: dev
cloud:
nacos:
discovery:

View File

@@ -0,0 +1,11 @@
spring:
cloud:
nacos:
config:
namespace: dd5265c5-8290-45bc-9d07-395c14c977d3
server-addr: 82.157.68.223:8848
group: service
username: nacos
password: nacos
enabled: true
file-extension: yml