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
9628df87
Commit
9628df87
authored
Feb 16, 2021
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.4.x'
Closes gh-25304
parents
488c3135
55e3ca66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
BackgroundPreinitializer.java
...ramework/boot/autoconfigure/BackgroundPreinitializer.java
+3
-3
TomcatServletWebServerFactory.java
...ot/web/embedded/tomcat/TomcatServletWebServerFactory.java
+3
-4
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java
View file @
9628df87
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
...
@@ -29,6 +29,7 @@ import org.springframework.boot.context.event.ApplicationReadyEvent;
import
org.springframework.boot.context.event.SpringApplicationEvent
;
import
org.springframework.boot.context.logging.LoggingApplicationListener
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.core.NativeDetector
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.format.support.DefaultFormattingConversionService
;
import
org.springframework.http.converter.json.Jackson2ObjectMapperBuilder
;
...
...
@@ -67,8 +68,7 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
private
static
final
boolean
ENABLED
;
static
{
ENABLED
=
!
Boolean
.
getBoolean
(
IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME
)
&&
System
.
getProperty
(
"org.graalvm.nativeimage.imagecode"
)
==
null
ENABLED
=
!
Boolean
.
getBoolean
(
IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME
)
&&
!
NativeDetector
.
inNativeImage
()
&&
Runtime
.
getRuntime
().
availableProcessors
()
>
1
;
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java
View file @
9628df87
/*
* Copyright 2012-202
0
the original author or authors.
* Copyright 2012-202
1
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.
...
...
@@ -71,6 +71,7 @@ import org.springframework.boot.web.server.WebServer;
import
org.springframework.boot.web.servlet.ServletContextInitializer
;
import
org.springframework.boot.web.servlet.server.AbstractServletWebServerFactory
;
import
org.springframework.context.ResourceLoaderAware
;
import
org.springframework.core.NativeDetector
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ClassUtils
;
...
...
@@ -110,8 +111,6 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
*/
public
static
final
String
DEFAULT_PROTOCOL
=
"org.apache.coyote.http11.Http11NioProtocol"
;
private
static
final
boolean
IN_NATIVE_IMAGE
=
System
.
getProperty
(
"org.graalvm.nativeimage.imagecode"
)
!=
null
;
private
File
baseDirectory
;
private
List
<
Valve
>
engineValves
=
new
ArrayList
<>();
...
...
@@ -169,7 +168,7 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
private
static
List
<
LifecycleListener
>
getDefaultLifecycleListeners
()
{
ArrayList
<
LifecycleListener
>
lifecycleListeners
=
new
ArrayList
<>();
if
(!
IN_NATIVE_IMAGE
)
{
if
(!
NativeDetector
.
inNativeImage
()
)
{
AprLifecycleListener
aprLifecycleListener
=
new
AprLifecycleListener
();
if
(
AprLifecycleListener
.
isAprAvailable
())
{
lifecycleListeners
.
add
(
aprLifecycleListener
);
...
...
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