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
ffe21175
Commit
ffe21175
authored
Apr 05, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Logback 1.1.7
Closes gh-5568
parent
dad4e84d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
33 deletions
+6
-33
BackgroundPreinitializer.java
...ramework/boot/autoconfigure/BackgroundPreinitializer.java
+5
-32
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/BackgroundPreinitializer.java
View file @
ffe21175
...
@@ -20,11 +20,9 @@ import javax.validation.Validation;
...
@@ -20,11 +20,9 @@ import javax.validation.Validation;
import
org.apache.catalina.mbeans.MBeanFactory
;
import
org.apache.catalina.mbeans.MBeanFactory
;
import
org.springframework.boot.context.event.Application
Start
edEvent
;
import
org.springframework.boot.context.event.Application
EnvironmentPrepar
edEvent
;
import
org.springframework.boot.logging.LoggingApplicationListener
;
import
org.springframework.boot.logging.LoggingApplicationListener
;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter
;
import
org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter
;
...
@@ -37,21 +35,11 @@ import org.springframework.http.converter.support.AllEncompassingFormHttpMessage
...
@@ -37,21 +35,11 @@ import org.springframework.http.converter.support.AllEncompassingFormHttpMessage
* @since 1.3.0
* @since 1.3.0
*/
*/
@Order
(
LoggingApplicationListener
.
DEFAULT_ORDER
+
1
)
@Order
(
LoggingApplicationListener
.
DEFAULT_ORDER
+
1
)
public
class
BackgroundPreinitializer
implements
ApplicationListener
<
ApplicationEvent
>
{
public
class
BackgroundPreinitializer
implements
ApplicationListener
<
ApplicationEnvironmentPreparedEvent
>
{
private
volatile
Thread
initializationThread
;
@Override
@Override
public
void
onApplicationEvent
(
ApplicationEvent
event
)
{
public
void
onApplicationEvent
(
ApplicationEnvironmentPreparedEvent
event
)
{
if
(
event
instanceof
ApplicationStartedEvent
)
{
performInitialization
();
}
else
if
(
event
instanceof
ContextRefreshedEvent
)
{
awaitInitialization
();
}
}
private
void
performInitialization
()
{
try
{
try
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
Thread
thread
=
new
Thread
(
new
Runnable
()
{
...
@@ -73,7 +61,6 @@ public class BackgroundPreinitializer implements ApplicationListener<Application
...
@@ -73,7 +61,6 @@ public class BackgroundPreinitializer implements ApplicationListener<Application
},
"background-preinit"
);
},
"background-preinit"
);
thread
.
start
();
thread
.
start
();
this
.
initializationThread
=
thread
;
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
// This will fail on GAE where creating threads is prohibited. We can safely
// This will fail on GAE where creating threads is prohibited. We can safely
...
@@ -82,21 +69,6 @@ public class BackgroundPreinitializer implements ApplicationListener<Application
...
@@ -82,21 +69,6 @@ public class BackgroundPreinitializer implements ApplicationListener<Application
}
}
}
}
private
void
awaitInitialization
()
{
Thread
thread
=
this
.
initializationThread
;
if
(
thread
!=
null
)
{
try
{
thread
.
join
();
}
catch
(
InterruptedException
ex
)
{
Thread
.
currentThread
().
interrupt
();
}
finally
{
this
.
initializationThread
=
null
;
}
}
}
/**
/**
* Early initializer for Spring MessageConverters.
* Early initializer for Spring MessageConverters.
*/
*/
...
@@ -132,4 +104,5 @@ public class BackgroundPreinitializer implements ApplicationListener<Application
...
@@ -132,4 +104,5 @@ public class BackgroundPreinitializer implements ApplicationListener<Application
}
}
}
}
}
}
spring-boot-dependencies/pom.xml
View file @
ffe21175
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
<liquibase.version>
3.4.2
</liquibase.version>
<liquibase.version>
3.4.2
</liquibase.version>
<log4j.version>
1.2.17
</log4j.version>
<log4j.version>
1.2.17
</log4j.version>
<log4j2.version>
2.4.1
</log4j2.version>
<log4j2.version>
2.4.1
</log4j2.version>
<logback.version>
1.1.
6
</logback.version>
<logback.version>
1.1.
7
</logback.version>
<mariadb.version>
1.2.3
</mariadb.version>
<mariadb.version>
1.2.3
</mariadb.version>
<mockito.version>
1.10.19
</mockito.version>
<mockito.version>
1.10.19
</mockito.version>
<mongodb.version>
2.13.3
</mongodb.version>
<mongodb.version>
2.13.3
</mongodb.version>
...
...
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