Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
shop-Mall
Commits
1132c048
Commit
1132c048
authored
Mar 22, 2021
by
m1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯模块——邀请码过滤特殊字符功能功能修复
parent
77daa080
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
19 deletions
+52
-19
Application.java
...rgy-web-admin/src/main/java/cn/wisenergy/Application.java
+2
-0
FileUploadConfig.java
...c/main/java/cn/wisenergy/web/config/FileUploadConfig.java
+23
-18
application-dev.yml
wisenergy-web-admin/src/main/resources/application-dev.yml
+13
-0
application-test.yml
wisenergy-web-admin/src/main/resources/application-test.yml
+12
-0
application.yml
wisenergy-web-admin/src/main/resources/application.yml
+2
-1
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/Application.java
View file @
1132c048
...
...
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
...
...
@@ -14,6 +15,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication
(
exclude
=
{
MultipartAutoConfiguration
.
class
})
@EnableSwagger2
@EnableScheduling
@Configuration
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Application
.
class
,
args
);
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/config/FileUploadConfig.java
View file @
1132c048
package
cn
.
wisenergy
.
web
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.multipart.MultipartResolver
;
import
org.springframework.web.multipart.commons.CommonsMultipartResolver
;
/**
* 文件上传配置
*
* @author wyy
* @date 2019-08-22 19:20
*/
//
@Configuration
//
public class FileUploadConfig {
//
//
/**
//
* 重新定义文件上传对象【springBoot request转化成MultipartHttpServletRequest】
//
*/
//
@Bean(name = "multipartResolver")
//
public MultipartResolver multipartResolver() {
//
CommonsMultipartResolver resolver = new CommonsMultipartResolver();
//
resolver.setDefaultEncoding("UTF-8");
//
resolver.setResolveLazily(true);
//
resolver.setMaxInMemorySize(1024 * 1024 * 1024);
//
resolver.setMaxUploadSize(1024 * 1024 * 1024);
//
resolver.setMaxUploadSizePerFile(1024 * 1024 * 1024);
//
return resolver;
//
}
//
//
}
@Configuration
public
class
FileUploadConfig
{
/**
* 重新定义文件上传对象【springBoot request转化成MultipartHttpServletRequest】
*/
@Bean
(
name
=
"multipartResolver"
)
public
MultipartResolver
multipartResolver
()
{
CommonsMultipartResolver
resolver
=
new
CommonsMultipartResolver
();
resolver
.
setDefaultEncoding
(
"UTF-8"
);
resolver
.
setResolveLazily
(
true
);
resolver
.
setMaxInMemorySize
(
1024
*
1024
*
1024
);
resolver
.
setMaxUploadSize
(
1024
*
1024
*
1024
);
resolver
.
setMaxUploadSizePerFile
(
1024
*
1024
*
1024
);
return
resolver
;
}
}
wisenergy-web-admin/src/main/resources/application-dev.yml
View file @
1132c048
spring
:
main
:
allow-bean-definition-overriding
:
true
# jackson时间格式化
jackson
:
time-zone
:
GMT+8
date-format
:
yyyy-MM-dd HH:mm:ss
servlet
:
multipart
:
max-file-size
:
1024MB
max-request-size
:
2048MB
enabled
:
true
mvc
:
throw-exception-if-no-handler-found
:
true
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
druid
:
...
...
wisenergy-web-admin/src/main/resources/application-test.yml
View file @
1132c048
spring
:
main
:
allow-bean-definition-overriding
:
true
# jackson时间格式化
jackson
:
time-zone
:
GMT+8
date-format
:
yyyy-MM-dd HH:mm:ss
servlet
:
multipart
:
max-file-size
:
1024MB
max-request-size
:
2048MB
enabled
:
true
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
druid
:
...
...
@@ -32,6 +43,7 @@ spring:
wall
:
config
:
multi-statement-allow
:
true
#/www/server/redis/src/redis-server
redis
:
open
:
false
# 是否开启redis缓存 true开启 false关闭
...
...
wisenergy-web-admin/src/main/resources/application.yml
View file @
1132c048
...
...
@@ -6,6 +6,8 @@ server:
min-spare
:
30
max-swallow-size
:
1024MB
max-http-form-post-size
:
1024MB
# 1 073 741 824
port
:
8997
servlet
:
context-path
:
/shop-mall
...
...
@@ -25,7 +27,6 @@ spring:
max-file-size
:
1024MB
max-request-size
:
2048MB
enabled
:
true
resolve-lazily
:
true
mvc
:
throw-exception-if-no-handler-found
:
true
# resources:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment