mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge branch '2.4.x'
Closes gh-25271
This commit is contained in:
commit
ca9b583c7d
@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*
|
||||
* @author Chris Bono
|
||||
*/
|
||||
class CassandraPropertiesTest {
|
||||
class CassandraPropertiesTests {
|
||||
|
||||
@Test
|
||||
void defaultValuesAreConsistent() {
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
* Copyright 2012-2021 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.
|
||||
@ -47,7 +47,7 @@ public class LifecycleAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void lifecycleProcessorIsConfiguredWithCustomDefaultTimeout() {
|
||||
void lifecycleProcessorIsConfiguredWithCustomTimeout() {
|
||||
this.contextRunner.withPropertyValues("spring.lifecycle.timeout-per-shutdown-phase=15s").run((context) -> {
|
||||
assertThat(context).hasBean(AbstractApplicationContext.LIFECYCLE_PROCESSOR_BEAN_NAME);
|
||||
Object processor = context.getBean(AbstractApplicationContext.LIFECYCLE_PROCESSOR_BEAN_NAME);
|
||||
@ -56,7 +56,7 @@ public class LifecycleAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void lifecycleProcessorIsConfiguredWithCustomDefaultTimeoutInAChildContext() {
|
||||
void lifecycleProcessorIsConfiguredWithCustomTimeoutInAChildContext() {
|
||||
new ApplicationContextRunner().run((parent) -> {
|
||||
this.contextRunner.withParent(parent).withPropertyValues("spring.lifecycle.timeout-per-shutdown-phase=15s")
|
||||
.run((child) -> {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2021 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.
|
||||
|
@ -621,7 +621,7 @@ This might result in two separate `application.properties` files mounted at diff
|
||||
In such a case, having a wildcard location of `config/*/`, will result in both files being processed.
|
||||
|
||||
By default, Spring Boot includes `config/*/` in the default search locations.
|
||||
The means that all subdirectories of the `/config` directory outside of your jar will be searched.
|
||||
It means that all subdirectories of the `/config` directory outside of your jar will be searched.
|
||||
|
||||
You can use wildcard locations yourself with the `spring.config.location` and `spring.config.additional-location` properties.
|
||||
|
||||
@ -2264,7 +2264,7 @@ If you want to take complete control of Spring MVC, you can add your own `@Confi
|
||||
[NOTE]
|
||||
====
|
||||
Spring MVC uses a different `ConversionService` to the one used to convert values from your `application.properties` or `application.yaml` file.
|
||||
The means that `Period`, `Duration` and `DataSize` converters are not available and that `@DurationUnit` and `@DataSizeUnit` annotations will be ignored.
|
||||
It means that `Period`, `Duration` and `DataSize` converters are not available and that `@DurationUnit` and `@DataSizeUnit` annotations will be ignored.
|
||||
|
||||
If you want to customize the `ConversionService` used by Spring MVC, you can provide a `WebMvcConfigurer` bean with an `addFormatters` method.
|
||||
From this method you can register any converter that you like, or you can delegate to the static methods available on `ApplicationConversionService`.
|
||||
|
Loading…
Reference in New Issue
Block a user