支持文件上传

This commit is contained in:
tanghc
2019-05-14 19:27:16 +08:00
parent 4e842f9318
commit 6a4072a6c7
32 changed files with 420 additions and 82 deletions

View File

@@ -23,7 +23,7 @@
<dependency>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-gateway-common</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.8.0-SNAPSHOT</version>
</dependency>
<!-- ↓↓↓ 使用spring cloud zuul ↓↓↓ -->

View File

@@ -4,8 +4,15 @@ server:
zuul:
# 入口地址,不用改,默认是/zuul
servlet-path: /api
# 禁用默认的过滤器,不能删,不用改
FormBodyWrapperFilter:
pre:
disable: true
Servlet30WrapperFilter:
pre:
disable: true
# 注册中心
# 注册中心,根据实际情况修改
eureka:
serverAddr: localhost:1111
client:
@@ -15,21 +22,29 @@ eureka:
spring:
application:
name: api-gateway
# zookeeper根据实际情况修改
cloud:
zookeeper:
connect-string: localhost:2181
gateway: # Spring Cloud Gateway配置如果用了zuul这段配置没有效果
# Spring Cloud Gateway配置如果用了zuul这段配置没有效果,不用改
gateway:
discovery:
locator:
lower-case-service-id: true
enabled: true
# 数据源
# 数据源,根据实际情况修改
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
password: root
# 上传文件配置,根据实际情况修改
servlet:
multipart:
enabled: true
max-file-size: 20MB # 上传文件最大20MB默认1MB
max-request-size: 20MB