You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.6 KiB
60 lines
1.6 KiB
server:
|
|
port: 8081
|
|
|
|
zuul:
|
|
# 入口地址,不用改,默认是/zuul
|
|
servlet-path: /api
|
|
# 禁用默认的过滤器,不能删,不用改
|
|
FormBodyWrapperFilter:
|
|
pre:
|
|
disable: true
|
|
Servlet30WrapperFilter:
|
|
pre:
|
|
disable: true
|
|
# 不用改,如果要改,请全局替换修改
|
|
secret: MZZOUSTua6LzApIWXCwEgbBmxSzpzC
|
|
|
|
ribbon:
|
|
# 设置为true(默认false),则所有请求都重试,默认只支持get请求重试
|
|
# 请谨慎设置,因为post请求大多都是写入请求,如果要支持重试,确保服务的幂等性
|
|
OkToRetryOnAllOperations: false
|
|
|
|
# eureka注册中心,如果使用nacos注册中心,这里要注释掉
|
|
eureka:
|
|
client:
|
|
serviceUrl:
|
|
defaultZone: http://localhost:1111/eureka/
|
|
|
|
spring:
|
|
application:
|
|
name: api-gateway
|
|
# zookeeper,根据实际情况修改
|
|
cloud:
|
|
zookeeper:
|
|
connect-string: localhost:2181
|
|
|
|
# Spring Cloud Gateway配置,如果用了zuul,这段配置没有效果,不用改
|
|
gateway:
|
|
discovery:
|
|
locator:
|
|
lower-case-service-id: true
|
|
enabled: true
|
|
|
|
# nacos注册中心,和eureka只能用一个
|
|
# nacos:
|
|
# discovery:
|
|
# server-addr: 127.0.0.1:8848
|
|
|
|
# 数据源,根据实际情况修改
|
|
datasource:
|
|
driver-class-name: com.mysql.jdbc.Driver
|
|
url: jdbc:mysql://localhost:3306/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
|
|
username: root
|
|
password: root
|
|
|
|
# 上传文件配置,根据实际情况修改
|
|
servlet:
|
|
multipart:
|
|
enabled: true
|
|
max-file-size: 20MB # 上传文件最大20MB,默认1MB
|
|
max-request-size: 20MB
|
|
|