See gh-25093
pull/25150/head
izeye 4 years ago committed by Stephane Nicoll
parent 1c5b802bfe
commit 63ee99bf75

@ -1055,7 +1055,7 @@ Also, if an application is using Kubernetes https://kubernetes.io/docs/tasks/run
[[production-ready-kubernetes-probes-lifecycle]]
==== Application lifecycle and Probes states
An important aspect of the Kubernetes Probes support is its consistency with the application lifecycle.
There is a significant different between the `AvailabilityState` which is the in-memory, internal state of the application -
There is a significant difference between the `AvailabilityState` which is the in-memory, internal state of the application
and the actual Probe which exposes that state: depending on the phase of application lifecycle, the Probe might not be available.
Spring Boot publishes <<spring-boot-features.adoc#boot-features-application-events-and-listeners,Application Events during startup and shutdown>>,
@ -1078,7 +1078,7 @@ When a Spring Boot application starts:
|Started
|`CORRECT`
|`REFUSING_TRAFFIC`
|Accepts requests
|Refuses requests
|The application context is refreshed. The application performs startup tasks and does not receive traffic yet.
|Ready

@ -157,7 +157,7 @@ The printed banner is registered as a singleton bean under the following name: `
The `${application.version}` and `${application.formatted-version}` properties are only available if you are using Spring Boot launchers.
The values won't be resolved if you are running an unpacked jar and starting it with `java -cp <classpath> <mainclass>`.
This is why we recommend that you always use launch unpacked jars using `java org.springframework.boot.loader.JarLauncher`.
This is why we recommend that you always launch unpacked jars using `java org.springframework.boot.loader.JarLauncher`.
This will initialize the `application.*` banner variables before building the classpath and launching your app.
====

@ -69,7 +69,7 @@ public class ApplicationConversionService extends FormattingConversionService {
* type.
* @param sourceType the source type to test
* @param targetType the target type to test
* @return is conversion happens via an {@code ObjectTo...} converter
* @return if conversion happens via an {@code ObjectTo...} converter
* @since 2.4.3
*/
public boolean isConvertViaObjectSourceType(TypeDescriptor sourceType, TypeDescriptor targetType) {

@ -77,13 +77,13 @@ class CharSequenceToObjectConverter implements ConditionalGenericConverter {
* required when ObjectTo... conversion produces incorrect results.
* @param sourceType the source type to test
* @param targetType the target type to test
* @return id string conversion is better
* @return if string conversion is better
*/
private boolean isStringConversionBetter(TypeDescriptor sourceType, TypeDescriptor targetType) {
if (this.conversionService instanceof ApplicationConversionService) {
ApplicationConversionService applicationConversionService = (ApplicationConversionService) this.conversionService;
if (applicationConversionService.isConvertViaObjectSourceType(sourceType, targetType)) {
// If and ObjectTo... converter is being used then there might be a better
// If an ObjectTo... converter is being used then there might be a better
// StringTo... version
return true;
}

Loading…
Cancel
Save