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
b725c601
Commit
b725c601
authored
Jul 17, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate DeploymentInfo customization with reactive Undertow
Fixes gh-17555
parent
30b5ba87
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
3 deletions
+59
-3
ServletManagementChildContextConfiguration.java
...b/servlet/ServletManagementChildContextConfiguration.java
+2
-1
UndertowWebServerFactoryCustomizer.java
...gure/web/embedded/UndertowWebServerFactoryCustomizer.java
+0
-2
UndertowServletWebServerFactoryCustomizer.java
...eb/servlet/UndertowServletWebServerFactoryCustomizer.java
+45
-0
ConfigurableUndertowWebServerFactory.java
...bedded/undertow/ConfigurableUndertowWebServerFactory.java
+5
-0
UndertowReactiveWebServerFactory.java
...b/embedded/undertow/UndertowReactiveWebServerFactory.java
+7
-0
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/ServletManagementChildContextConfiguration.java
View file @
b725c601
...
...
@@ -44,6 +44,7 @@ import org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactor
import
org.springframework.boot.autoconfigure.web.embedded.UndertowWebServerFactoryCustomizer
;
import
org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryCustomizer
;
import
org.springframework.boot.autoconfigure.web.servlet.TomcatServletWebServerFactoryCustomizer
;
import
org.springframework.boot.autoconfigure.web.servlet.UndertowServletWebServerFactoryCustomizer
;
import
org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory
;
...
...
@@ -113,7 +114,7 @@ class ServletManagementChildContextConfiguration {
ServletManagementWebServerFactoryCustomizer
(
ListableBeanFactory
beanFactory
)
{
super
(
beanFactory
,
ServletWebServerFactoryCustomizer
.
class
,
TomcatServletWebServerFactoryCustomizer
.
class
,
TomcatWebServerFactoryCustomizer
.
class
,
JettyWebServerFactoryCustomizer
.
class
,
UndertowWebServerFactoryCustomizer
.
class
);
Undertow
ServletWebServerFactoryCustomizer
.
class
,
Undertow
WebServerFactoryCustomizer
.
class
);
}
@Override
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizer.java
View file @
b725c601
...
...
@@ -82,8 +82,6 @@ public class UndertowWebServerFactoryCustomizer
.
to
((
maxHttpPostSize
)
->
customizeMaxHttpPostSize
(
factory
,
maxHttpPostSize
));
propertyMapper
.
from
(
properties:
:
getConnectionTimeout
)
.
to
((
connectionTimeout
)
->
customizeConnectionTimeout
(
factory
,
connectionTimeout
));
factory
.
addDeploymentInfoCustomizers
(
(
deploymentInfo
)
->
deploymentInfo
.
setEagerFilterInit
(
undertowProperties
.
isEagerFilterInit
()));
}
private
boolean
isPositive
(
Number
value
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/UndertowServletWebServerFactoryCustomizer.java
0 → 100644
View file @
b725c601
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
web
.
servlet
;
import
org.springframework.boot.autoconfigure.web.ServerProperties
;
import
org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory
;
import
org.springframework.boot.web.server.WebServerFactoryCustomizer
;
/**
* {@link WebServerFactoryCustomizer} to apply {@link ServerProperties} to Undertow
* Servlet web servers.
*
* @author Andy Wilkinson
* @since 2.1.7
*/
public
class
UndertowServletWebServerFactoryCustomizer
implements
WebServerFactoryCustomizer
<
UndertowServletWebServerFactory
>
{
private
final
ServerProperties
serverProperties
;
public
UndertowServletWebServerFactoryCustomizer
(
ServerProperties
serverProperties
)
{
this
.
serverProperties
=
serverProperties
;
}
@Override
public
void
customize
(
UndertowServletWebServerFactory
factory
)
{
factory
.
addDeploymentInfoCustomizers
((
deploymentInfo
)
->
deploymentInfo
.
setEagerFilterInit
(
this
.
serverProperties
.
getUndertow
().
isEagerFilterInit
()));
}
}
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/ConfigurableUndertowWebServerFactory.java
View file @
b725c601
...
...
@@ -44,7 +44,12 @@ public interface ConfigurableUndertowWebServerFactory extends ConfigurableWebSer
* Add {@link UndertowDeploymentInfoCustomizer}s that should be used to customize the
* Undertow {@link DeploymentInfo}.
* @param customizers the customizers to add
* @deprecated since 2.1.7 in favor of
* {@link UndertowServletWebServerFactory#addDeploymentInfoCustomizers(UndertowDeploymentInfoCustomizer...)}
* as {@link UndertowReactiveWebServerFactory} does not create a
* {@link DeploymentInfo}
*/
@Deprecated
void
addDeploymentInfoCustomizers
(
UndertowDeploymentInfoCustomizer
...
customizers
);
/**
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowReactiveWebServerFactory.java
View file @
b725c601
...
...
@@ -54,6 +54,7 @@ public class UndertowReactiveWebServerFactory extends AbstractReactiveWebServerF
private
List
<
UndertowBuilderCustomizer
>
builderCustomizers
=
new
ArrayList
<>();
@Deprecated
private
List
<
UndertowDeploymentInfoCustomizer
>
deploymentInfoCustomizers
=
new
ArrayList
<>();
private
Integer
bufferSize
;
...
...
@@ -203,7 +204,10 @@ public class UndertowReactiveWebServerFactory extends AbstractReactiveWebServerF
* Undertow {@link DeploymentInfo}. Calling this method will replace any existing
* customizers.
* @param customizers the customizers to set
* @deprecated since 2.1.7 as the factory does not create a {@link DeploymentInfo}
* making customization redundant
*/
@Deprecated
public
void
setDeploymentInfoCustomizers
(
Collection
<?
extends
UndertowDeploymentInfoCustomizer
>
customizers
)
{
Assert
.
notNull
(
customizers
,
"Customizers must not be null"
);
this
.
deploymentInfoCustomizers
=
new
ArrayList
<>(
customizers
);
...
...
@@ -213,7 +217,10 @@ public class UndertowReactiveWebServerFactory extends AbstractReactiveWebServerF
* Returns a mutable collection of the {@link UndertowDeploymentInfoCustomizer}s that
* will be applied to the Undertow {@link DeploymentInfo}.
* @return the customizers that will be applied
* @deprecated since 2.1.7 as the factory does not create a {@link DeploymentInfo}
* making customization redundant
*/
@Deprecated
public
Collection
<
UndertowDeploymentInfoCustomizer
>
getDeploymentInfoCustomizers
()
{
return
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