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
997f07d1
Commit
997f07d1
authored
Mar 05, 2019
by
ayudovin
Committed by
Stephane Nicoll
Mar 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add default no-op method to SpringApplicationRunListener
See gh-16104
parent
3d0219c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
SpringApplicationRunListener.java
...rg/springframework/boot/SpringApplicationRunListener.java
+15
-7
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplicationRunListener.java
View file @
997f07d1
...
@@ -31,6 +31,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
...
@@ -31,6 +31,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
* @author Phillip Webb
* @author Phillip Webb
* @author Dave Syer
* @author Dave Syer
* @author Andy Wilkinson
* @author Andy Wilkinson
* @author Artsiom Yudovin
*/
*/
public
interface
SpringApplicationRunListener
{
public
interface
SpringApplicationRunListener
{
...
@@ -38,28 +39,32 @@ public interface SpringApplicationRunListener {
...
@@ -38,28 +39,32 @@ public interface SpringApplicationRunListener {
* Called immediately when the run method has first started. Can be used for very
* Called immediately when the run method has first started. Can be used for very
* early initialization.
* early initialization.
*/
*/
void
starting
();
default
void
starting
()
{
}
/**
/**
* Called once the environment has been prepared, but before the
* Called once the environment has been prepared, but before the
* {@link ApplicationContext} has been created.
* {@link ApplicationContext} has been created.
* @param environment the environment
* @param environment the environment
*/
*/
void
environmentPrepared
(
ConfigurableEnvironment
environment
);
default
void
environmentPrepared
(
ConfigurableEnvironment
environment
)
{
}
/**
/**
* Called once the {@link ApplicationContext} has been created and prepared, but
* Called once the {@link ApplicationContext} has been created and prepared, but
* before sources have been loaded.
* before sources have been loaded.
* @param context the application context
* @param context the application context
*/
*/
void
contextPrepared
(
ConfigurableApplicationContext
context
);
default
void
contextPrepared
(
ConfigurableApplicationContext
context
)
{
}
/**
/**
* Called once the application context has been loaded but before it has been
* Called once the application context has been loaded but before it has been
* refreshed.
* refreshed.
* @param context the application context
* @param context the application context
*/
*/
void
contextLoaded
(
ConfigurableApplicationContext
context
);
default
void
contextLoaded
(
ConfigurableApplicationContext
context
)
{
}
/**
/**
* The context has been refreshed and the application has started but
* The context has been refreshed and the application has started but
...
@@ -68,7 +73,8 @@ public interface SpringApplicationRunListener {
...
@@ -68,7 +73,8 @@ public interface SpringApplicationRunListener {
* @param context the application context.
* @param context the application context.
* @since 2.0.0
* @since 2.0.0
*/
*/
void
started
(
ConfigurableApplicationContext
context
);
default
void
started
(
ConfigurableApplicationContext
context
)
{
}
/**
/**
* Called immediately before the run method finishes, when the application context has
* Called immediately before the run method finishes, when the application context has
...
@@ -77,7 +83,8 @@ public interface SpringApplicationRunListener {
...
@@ -77,7 +83,8 @@ public interface SpringApplicationRunListener {
* @param context the application context.
* @param context the application context.
* @since 2.0.0
* @since 2.0.0
*/
*/
void
running
(
ConfigurableApplicationContext
context
);
default
void
running
(
ConfigurableApplicationContext
context
)
{
}
/**
/**
* Called when a failure occurs when running the application.
* Called when a failure occurs when running the application.
...
@@ -86,6 +93,7 @@ public interface SpringApplicationRunListener {
...
@@ -86,6 +93,7 @@ public interface SpringApplicationRunListener {
* @param exception the failure
* @param exception the failure
* @since 2.0.0
* @since 2.0.0
*/
*/
void
failed
(
ConfigurableApplicationContext
context
,
Throwable
exception
);
default
void
failed
(
ConfigurableApplicationContext
context
,
Throwable
exception
)
{
}
}
}
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