2023-12-26 09:07:12 +08:00
|
|
|
server:
|
|
|
|
port: 8500
|
|
|
|
spring:
|
|
|
|
application:
|
|
|
|
name: spzx-server-gateway
|
|
|
|
cloud:
|
|
|
|
nacos:
|
|
|
|
discovery:
|
2023-12-27 16:16:31 +08:00
|
|
|
server-addr: 192.168.2.82:8848
|
2023-12-28 12:47:25 +08:00
|
|
|
# server-addr: 192.168.31.202:8848
|
2023-12-26 09:07:12 +08:00
|
|
|
gateway:
|
|
|
|
discovery:
|
|
|
|
locator:
|
|
|
|
enabled: true
|
|
|
|
globalcors:
|
|
|
|
cors-configurations:
|
|
|
|
'[/**]':
|
|
|
|
allowedOriginPatterns: "*"
|
|
|
|
# 允许请求中携带的头信息
|
|
|
|
allowedHeaders: "*"
|
|
|
|
# 运行跨域的请求方式
|
|
|
|
allowedMethods: "*"
|
|
|
|
# 跨域检测的有效期,单位s
|
|
|
|
maxAge: 36000
|
|
|
|
routes:
|
|
|
|
- id: service-product
|
|
|
|
uri: lb://service-product
|
|
|
|
predicates:
|
|
|
|
- Path=/*/product/**
|
2023-12-26 15:12:19 +08:00
|
|
|
- id: service-user
|
|
|
|
uri: lb://service-user
|
|
|
|
predicates:
|
|
|
|
- Path=/*/user/**
|
2023-12-28 13:44:51 +08:00
|
|
|
- id: service-cart
|
|
|
|
uri: lb://service-cart
|
|
|
|
predicates:
|
|
|
|
- Path=/api/order/cart/**
|
2023-12-26 09:07:12 +08:00
|
|
|
|
|
|
|
datasource:
|
|
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
|
|
url: jdbc:mysql://60.204.230.80:3306/db_spzx?characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true
|
|
|
|
username: root
|
|
|
|
password: "02120212"
|
2023-12-27 16:16:31 +08:00
|
|
|
data:
|
|
|
|
redis:
|
|
|
|
host: 192.168.2.82
|
2023-12-28 12:47:25 +08:00
|
|
|
# host: 192.168.31.202
|
2023-12-27 16:16:31 +08:00
|
|
|
port: 6379
|
2023-12-26 09:07:12 +08:00
|
|
|
mybatis:
|
|
|
|
config-location: classpath:mybatis-config.xml
|
2023-12-28 12:47:25 +08:00
|
|
|
mapper-locations: classpath:/mapper/*/*.xml
|