Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-server
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
data-server
Commits
049b4d2c
Commit
049b4d2c
authored
4 years ago
by
liqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
99c461c7
master
No related merge requests found
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
;
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
* @author wyy
* @date 2019-08-22 19:20
* @date 2019-08-22 19:20
*/
*/
@Configuration
//@Configuration
public
class
FileUploadConfig
{
//public class FileUploadConfig {
//
/**
// /**
* 重新定义文件上传对象【springBoot request转化成MultipartHttpServletRequest】
// * 重新定义文件上传对象【springBoot request转化成MultipartHttpServletRequest】
*
// */
* @return
// @Bean(name = "multipartResolver")
*/
// public MultipartResolver multipartResolver() {
@Bean
(
name
=
"multipartResolver"
)
// CommonsMultipartResolver resolver = new CommonsMultipartResolver();
public
MultipartResolver
multipartResolver
()
{
// resolver.setDefaultEncoding("UTF-8");
CommonsMultipartResolver
resolver
=
new
CommonsMultipartResolver
();
// resolver.setResolveLazily(true);
resolver
.
setDefaultEncoding
(
"UTF-8"
);
// resolver.setMaxInMemorySize(1024 * 1024 * 1024);
resolver
.
setResolveLazily
(
true
);
// resolver.setMaxUploadSize(1024 * 1024 * 1024);
resolver
.
setMaxInMemorySize
(
1024
*
1024
*
1024
);
// resolver.setMaxUploadSizePerFile(1024 * 1024 * 1024);
resolver
.
setMaxUploadSize
(
1024
*
1024
*
1024
);
// return resolver;
resolver
.
setMaxUploadSizePerFile
(
1024
*
1024
*
1024
);
// }
return
resolver
;
//
}
//}
}
This diff is collapsed.
Click to expand it.
wisenergy-web-admin/src/main/resources/application.yml
View file @
049b4d2c
...
@@ -4,8 +4,8 @@ server:
...
@@ -4,8 +4,8 @@ server:
threads
:
threads
:
max
:
1000
max
:
1000
min-spare
:
30
min-spare
:
30
max-swallow-size
:
10
0
MB
max-swallow-size
:
10
24
MB
max-http-form-post-size
:
10
0
MB
max-http-form-post-size
:
10
24
MB
port
:
8997
port
:
8997
servlet
:
servlet
:
context-path
:
/shop-mall
context-path
:
/shop-mall
...
...
This diff is collapsed.
Click to expand it.
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