From da1cde6717649db7474da4e00d026b504377de71 Mon Sep 17 00:00:00 2001 From: zhouhao Date: Wed, 26 Jul 2017 12:09:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hsweb-examples/hsweb-examples-simple/pom.xml | 22 ++++++++++++++++--- .../web/example/simple/SpringBootExample.java | 7 +++--- .../src/main/resources/application.yml | 5 +++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/hsweb-examples/hsweb-examples-simple/pom.xml b/hsweb-examples/hsweb-examples-simple/pom.xml index e3dda4286..d6f02ed5b 100644 --- a/hsweb-examples/hsweb-examples-simple/pom.xml +++ b/hsweb-examples/hsweb-examples-simple/pom.xml @@ -90,8 +90,18 @@ org.hswebframework.web hsweb-spring-boot-starter ${project.version} + + + org.springframework.boot + spring-boot-starter-tomcat + + + + org.springframework.boot + spring-boot-starter-undertow + org.hswebframework.web @@ -100,9 +110,9 @@ - - - + + + @@ -112,6 +122,12 @@ ${project.version} + + org.hswebframework.web + hsweb-system-file-starter + ${project.version} + + org.hswebframework.web diff --git a/hsweb-examples/hsweb-examples-simple/src/main/java/org/hswebframework/web/example/simple/SpringBootExample.java b/hsweb-examples/hsweb-examples-simple/src/main/java/org/hswebframework/web/example/simple/SpringBootExample.java index 6f5549f2d..deb9f4830 100644 --- a/hsweb-examples/hsweb-examples-simple/src/main/java/org/hswebframework/web/example/simple/SpringBootExample.java +++ b/hsweb-examples/hsweb-examples-simple/src/main/java/org/hswebframework/web/example/simple/SpringBootExample.java @@ -89,10 +89,12 @@ public class SpringBootExample ServletResponse.class, InputStream.class, OutputStream.class, - MultipartFile.class + MultipartFile.class, + MultipartFile[].class }; return loggerInfo -> System.out.println("有请求啦:" + JSON.toJSONString(loggerInfo.toSimpleMap(obj -> { - if (Stream.of(excludes).anyMatch(aClass -> aClass.isInstance(obj))) return obj.getClass().getName(); + if (Stream.of(excludes).anyMatch(aClass -> aClass.isInstance(obj))) + return obj.getClass().getName(); return JSON.toJSONString(obj); }))); } @@ -120,7 +122,6 @@ public class SpringBootExample } - @Autowired UserService userService; @Autowired diff --git a/hsweb-examples/hsweb-examples-simple/src/main/resources/application.yml b/hsweb-examples/hsweb-examples-simple/src/main/resources/application.yml index d952da83b..efa3fb508 100644 --- a/hsweb-examples/hsweb-examples-simple/src/main/resources/application.yml +++ b/hsweb-examples/hsweb-examples-simple/src/main/resources/application.yml @@ -10,6 +10,11 @@ spring: driver-class-name : org.h2.Driver cache: type: simple + http: + multipart: + enabled: true + max-file-size: 100Mb + hsweb: authorize: # filters: