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
049b4d2c
Commit
049b4d2c
authored
Mar 22, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
99c461c7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
197 deletions
+20
-197
wisenergy-model.iml
wisenergy-model/wisenergy-model.iml
+0
-171
FileUploadConfig.java
...c/main/java/cn/wisenergy/web/config/FileUploadConfig.java
+18
-24
application.yml
wisenergy-web-admin/src/main/resources/application.yml
+2
-2
No files found.
wisenergy-model/wisenergy-model.iml
View file @
049b4d2c
This diff is collapsed.
Click to expand it.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/config/FileUploadConfig.java
View file @
049b4d2c
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】
*
* @return
*/
@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.yml
View file @
049b4d2c
...
...
@@ -4,8 +4,8 @@ server:
threads
:
max
:
1000
min-spare
:
30
max-swallow-size
:
10
0
MB
max-http-form-post-size
:
10
0
MB
max-swallow-size
:
10
24
MB
max-http-form-post-size
:
10
24
MB
port
:
8997
servlet
:
context-path
:
/shop-mall
...
...
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