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
1b40b0ed
Commit
1b40b0ed
authored
Dec 03, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish contribution
Closes gh-15054
parent
3059f0e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
TomcatWebServerFactoryCustomizer.java
...figure/web/embedded/TomcatWebServerFactoryCustomizer.java
+7
-7
ServerPropertiesTests.java
...amework/boot/autoconfigure/web/ServerPropertiesTests.java
+6
-0
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java
View file @
1b40b0ed
...
@@ -136,6 +136,13 @@ public class TomcatWebServerFactoryCustomizer implements
...
@@ -136,6 +136,13 @@ public class TomcatWebServerFactoryCustomizer implements
});
});
}
}
private
void
customizeProcessorCache
(
ConfigurableTomcatWebServerFactory
factory
,
int
processorCache
)
{
factory
.
addConnectorCustomizers
((
connector
)
->
((
AbstractHttp11Protocol
<?>)
connector
.
getProtocolHandler
())
.
setProcessorCache
(
processorCache
));
}
private
void
customizeMaxConnections
(
ConfigurableTomcatWebServerFactory
factory
,
private
void
customizeMaxConnections
(
ConfigurableTomcatWebServerFactory
factory
,
int
maxConnections
)
{
int
maxConnections
)
{
factory
.
addConnectorCustomizers
((
connector
)
->
{
factory
.
addConnectorCustomizers
((
connector
)
->
{
...
@@ -158,13 +165,6 @@ public class TomcatWebServerFactoryCustomizer implements
...
@@ -158,13 +165,6 @@ public class TomcatWebServerFactoryCustomizer implements
});
});
}
}
private
void
customizeProcessorCache
(
ConfigurableTomcatWebServerFactory
factory
,
int
processorCache
)
{
factory
.
addConnectorCustomizers
((
connector
)
->
((
AbstractHttp11Protocol
<?>)
connector
.
getProtocolHandler
())
.
setProcessorCache
(
processorCache
));
}
private
void
customizeRemoteIpValve
(
ConfigurableTomcatWebServerFactory
factory
)
{
private
void
customizeRemoteIpValve
(
ConfigurableTomcatWebServerFactory
factory
)
{
Tomcat
tomcatProperties
=
this
.
serverProperties
.
getTomcat
();
Tomcat
tomcatProperties
=
this
.
serverProperties
.
getTomcat
();
String
protocolHeader
=
tomcatProperties
.
getProtocolHeader
();
String
protocolHeader
=
tomcatProperties
.
getProtocolHeader
();
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
View file @
1b40b0ed
...
@@ -206,6 +206,12 @@ public class ServerPropertiesTests {
...
@@ -206,6 +206,12 @@ public class ServerPropertiesTests {
.
isEqualTo
(
getDefaultProtocol
().
getAcceptCount
());
.
isEqualTo
(
getDefaultProtocol
().
getAcceptCount
());
}
}
@Test
public
void
tomcatProcessorCacheMatchesProtocolDefault
()
throws
Exception
{
assertThat
(
this
.
properties
.
getTomcat
().
getProcessorCache
())
.
isEqualTo
(
getDefaultProtocol
().
getProcessorCache
());
}
@Test
@Test
public
void
tomcatMaxConnectionsMatchesProtocolDefault
()
throws
Exception
{
public
void
tomcatMaxConnectionsMatchesProtocolDefault
()
throws
Exception
{
assertThat
(
this
.
properties
.
getTomcat
().
getMaxConnections
())
assertThat
(
this
.
properties
.
getTomcat
().
getMaxConnections
())
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
1b40b0ed
...
@@ -276,7 +276,7 @@ content into your application. Rather, pick only the properties that you need.
...
@@ -276,7 +276,7 @@ content into your application. Rather, pick only the properties that you need.
server.tomcat.max-threads=200 # Maximum amount of worker threads.
server.tomcat.max-threads=200 # Maximum amount of worker threads.
server.tomcat.min-spare-threads=10 # Minimum amount of worker threads.
server.tomcat.min-spare-threads=10 # Minimum amount of worker threads.
server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value.
server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value.
server.tomcat.processor-cache= # Maximum number of idle processors that will be retained in the cache and reused with a subsequent request.
server.tomcat.processor-cache=
200
# Maximum number of idle processors that will be retained in the cache and reused with a subsequent request.
server.tomcat.protocol-header= # Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
server.tomcat.protocol-header= # Header that holds the incoming protocol, usually named "X-Forwarded-Proto".
server.tomcat.protocol-header-https-value=https # Value of the protocol header indicating whether the incoming request uses SSL.
server.tomcat.protocol-header-https-value=https # Value of the protocol header indicating whether the incoming request uses SSL.
server.tomcat.redirect-context-root=true # Whether requests to the context root should be redirected by appending a / to the path.
server.tomcat.redirect-context-root=true # Whether requests to the context root should be redirected by appending a / to the path.
...
...
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