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
f52cdf10
Commit
f52cdf10
authored
Jul 13, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update WebServerInitEvent docs to reflect ordering w.r.t. refresh
Closes gh-22277
parent
f18b657f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
spring-boot-features.adoc
...ing-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
+2
-2
WebServerInitializedEvent.java
...framework/boot/web/context/WebServerInitializedEvent.java
+3
-3
ReactiveWebServerInitializedEvent.java
...b/reactive/context/ReactiveWebServerInitializedEvent.java
+3
-4
ServletWebServerInitializedEvent.java
...web/servlet/context/ServletWebServerInitializedEvent.java
+3
-4
No files found.
spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
View file @
f52cdf10
...
@@ -319,9 +319,9 @@ Application events are sent in the following order, as your application runs:
...
@@ -319,9 +319,9 @@ Application events are sent in the following order, as your application runs:
The above list only includes ``SpringApplicationEvent``s that are tied to a `SpringApplication`.
The above list only includes ``SpringApplicationEvent``s that are tied to a `SpringApplication`.
In addition to these, the following events are also published after `ApplicationPreparedEvent` and before `ApplicationStartedEvent`:
In addition to these, the following events are also published after `ApplicationPreparedEvent` and before `ApplicationStartedEvent`:
. A `ContextRefreshedEvent` is sent when an `ApplicationContext` is refreshed.
- A `WebServerInitializedEvent` is sent after the `WebServer` is ready.
. A `WebServerInitializedEvent` is sent after the `WebServer` is ready.
`ServletWebServerInitializedEvent` and `ReactiveWebServerInitializedEvent` are the servlet and reactive variants respectively.
`ServletWebServerInitializedEvent` and `ReactiveWebServerInitializedEvent` are the servlet and reactive variants respectively.
- A `ContextRefreshedEvent` is sent when an `ApplicationContext` is refreshed.
TIP: You often need not use application events, but it can be handy to know that they exist.
TIP: You often need not use application events, but it can be handy to know that they exist.
Internally, Spring Boot uses events to handle a variety of tasks.
Internally, Spring Boot uses events to handle a variety of tasks.
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/context/WebServerInitializedEvent.java
View file @
f52cdf10
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -20,8 +20,8 @@ import org.springframework.boot.web.server.WebServer;
...
@@ -20,8 +20,8 @@ import org.springframework.boot.web.server.WebServer;
import
org.springframework.context.ApplicationEvent
;
import
org.springframework.context.ApplicationEvent
;
/**
/**
* Event to be published
after the application context is refreshed and
the
* Event to be published
when the {@link WebServer} is ready. Useful for obtaining
the
*
{@link WebServer} is ready. Useful for obtaining the
local port of a running server.
* local port of a running server.
*
*
* @author Brian Clozel
* @author Brian Clozel
* @author Stephane Nicoll
* @author Stephane Nicoll
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/context/ReactiveWebServerInitializedEvent.java
View file @
f52cdf10
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -20,9 +20,8 @@ import org.springframework.boot.web.context.WebServerInitializedEvent;
...
@@ -20,9 +20,8 @@ import org.springframework.boot.web.context.WebServerInitializedEvent;
import
org.springframework.boot.web.server.WebServer
;
import
org.springframework.boot.web.server.WebServer
;
/**
/**
* Event to be published after the {@link ReactiveWebServerApplicationContext} is
* Event to be published after the {@link WebServer} is ready. Useful for obtaining the
* refreshed and the {@link WebServer} is ready. Useful for obtaining the local port of a
* local port of a running server.
* running server.
*
*
* @author Brian Clozel
* @author Brian Clozel
* @author Stephane Nicoll
* @author Stephane Nicoll
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/ServletWebServerInitializedEvent.java
View file @
f52cdf10
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -20,9 +20,8 @@ import org.springframework.boot.web.context.WebServerInitializedEvent;
...
@@ -20,9 +20,8 @@ import org.springframework.boot.web.context.WebServerInitializedEvent;
import
org.springframework.boot.web.server.WebServer
;
import
org.springframework.boot.web.server.WebServer
;
/**
/**
* Event to be published after the {@link ServletWebServerApplicationContext} is refreshed
* Event to be published after the {@link WebServer} is ready. Useful for obtaining the
* and the {@link WebServer} is ready. Useful for obtaining the local port of a running
* local port of a running server.
* server.
*
*
* <p>
* <p>
* Normally it will have been started, but listeners are free to inspect the server and
* Normally it will have been started, but listeners are free to inspect the server and
...
...
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