Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
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
DEMO
spring-boot
Commits
b8a1043e
Commit
b8a1043e
authored
Aug 08, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x'
Closes gh-17813
parents
9d4671ac
c04454dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
MultipartAutoConfigurationTests.java
...onfigure/web/servlet/MultipartAutoConfigurationTests.java
+31
-0
UndertowServletWebServerFactory.java
...eb/embedded/undertow/UndertowServletWebServerFactory.java
+1
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java
View file @
b8a1043e
...
@@ -148,6 +148,16 @@ class MultipartAutoConfigurationTests {
...
@@ -148,6 +148,16 @@ class MultipartAutoConfigurationTests {
.
isSameAs
(
this
.
context
.
getBean
(
DispatcherServlet
.
class
).
getMultipartResolver
());
.
isSameAs
(
this
.
context
.
getBean
(
DispatcherServlet
.
class
).
getMultipartResolver
());
}
}
@Test
void
webServerWithNonAbsoluteMultipartLocationUndertowConfiguration
()
{
this
.
context
=
new
AnnotationConfigServletWebServerApplicationContext
(
WebServerWithNonAbsolutePathUndertow
.
class
,
BaseConfiguration
.
class
);
this
.
context
.
getBean
(
MultipartConfigElement
.
class
);
verifyServletWorks
();
assertThat
(
this
.
context
.
getBean
(
StandardServletMultipartResolver
.
class
))
.
isSameAs
(
this
.
context
.
getBean
(
DispatcherServlet
.
class
).
getMultipartResolver
());
}
@Test
@Test
void
webServerWithMultipartConfigDisabled
()
{
void
webServerWithMultipartConfigDisabled
()
{
testWebServerWithCustomMultipartConfigEnabledSetting
(
"false"
,
0
);
testWebServerWithCustomMultipartConfigEnabledSetting
(
"false"
,
0
);
...
@@ -365,6 +375,27 @@ class MultipartAutoConfigurationTests {
...
@@ -365,6 +375,27 @@ class MultipartAutoConfigurationTests {
}
}
@Configuration
(
proxyBeanMethods
=
false
)
@EnableWebMvc
static
class
WebServerWithNonAbsolutePathUndertow
{
@Bean
MultipartConfigElement
multipartConfigElement
()
{
return
new
MultipartConfigElement
(
"test/not-absolute"
);
}
@Bean
UndertowServletWebServerFactory
webServerFactory
()
{
return
new
UndertowServletWebServerFactory
();
}
@Bean
WebController
webController
()
{
return
new
WebController
();
}
}
@Configuration
(
proxyBeanMethods
=
false
)
@Configuration
(
proxyBeanMethods
=
false
)
static
class
WebServerWithCustomMultipartResolver
{
static
class
WebServerWithCustomMultipartResolver
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java
View file @
b8a1043e
...
@@ -271,6 +271,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
...
@@ -271,6 +271,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
configureErrorPages
(
deployment
);
configureErrorPages
(
deployment
);
deployment
.
setServletStackTraces
(
ServletStackTraces
.
NONE
);
deployment
.
setServletStackTraces
(
ServletStackTraces
.
NONE
);
deployment
.
setResourceManager
(
getDocumentRootResourceManager
());
deployment
.
setResourceManager
(
getDocumentRootResourceManager
());
deployment
.
setTempDir
(
createTempDir
(
"undertow"
));
deployment
.
setEagerFilterInit
(
this
.
eagerInitFilters
);
deployment
.
setEagerFilterInit
(
this
.
eagerInitFilters
);
configureMimeMappings
(
deployment
);
configureMimeMappings
(
deployment
);
for
(
UndertowDeploymentInfoCustomizer
customizer
:
this
.
deploymentInfoCustomizers
)
{
for
(
UndertowDeploymentInfoCustomizer
customizer
:
this
.
deploymentInfoCustomizers
)
{
...
...
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