server.port=8081 # ------- 需要改的配置 ------- # mysql数据库账号 mysql.username=root mysql.password=root # eureka注册中心地址 eureka.url=http://localhost:1111/eureka/ # zookeeper地址 zookeeper.url=localhost:2181 # zipkin服务监控地址,没有开启不用改 zipkin.url=http://127.0.0.1:9411/ # ------- 需要改的配置end ------- ######### 下面的配置基本不用改 ######### spring.application.name=api-gateway # 入口地址,不用改,默认是/zuul zuul.servlet-path=/api # 禁用默认的过滤器,不能删,不用改 zuul.FormBodyWrapperFilter.pre.disable=true zuul.Servlet30WrapperFilter.pre.disable=true # 不用改,如果要改,请全局替换修改 zuul.secret=MZZOUSTua6LzApIWXCwEgbBmxSzpzC # https://blog.csdn.net/qq_36872046/article/details/81058045 # 路由转发超时时间,毫秒,默认值1000,详见:RibbonClientConfiguration.DEFAULT_READ_TIMEOUT。 # 如果微服务端 处理时间过长,会导致ribbon read超时,解决办法将这个值调大一点 ribbon.ReadTimeout=2000 # 设置为true(默认false),则所有请求都重试,默认只支持get请求重试 # 请谨慎设置,因为post请求大多都是写入请求,如果要支持重试,确保服务的幂等性 ribbon.OkToRetryOnAllOperations=false eureka.client.serviceUrl.defaultZone=${eureka.url} spring.cloud.zookeeper.connect-string=${zookeeper.url} #spring.cloud.gateway.discovery.locator.lower-case-service-id=true #spring.cloud.gateway.discovery.locator.enabled=true spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/sop?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull spring.datasource.username=${mysql.username} spring.datasource.password=${mysql.password} # 文件上传配置 spring.servlet.multipart.enabled=true spring.servlet.multipart.max-file-size=20MB spring.servlet.multipart.max-request-size=20MB # zipkin服务跟踪 spring.zipkin.base-url=${zipkin.url} # 设置sleuth收集信息的比率,默认0.1,最大是1,数字越大越耗性能 spring.sleuth.sampler.probability=1