parent
9c43ed716a
commit
175b6473c7
|
@ -30,7 +30,6 @@ import org.springframework.boot.test.context.FilteredClassLoader;
|
|||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.as;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
@ -129,8 +128,7 @@ class WavefrontSenderConfigurationTests {
|
|||
"management.wavefront.api-token=abcde")
|
||||
.run((context) -> {
|
||||
WavefrontSender sender = context.getBean(WavefrontSender.class);
|
||||
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
|
||||
assertThat(tokenService).isInstanceOf(WavefrontTokenService.class);
|
||||
assertThat(sender).extracting("tokenService").isInstanceOf(WavefrontTokenService.class);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -141,8 +139,7 @@ class WavefrontSenderConfigurationTests {
|
|||
"management.wavefront.api-token=abcde")
|
||||
.run((context) -> {
|
||||
WavefrontSender sender = context.getBean(WavefrontSender.class);
|
||||
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
|
||||
assertThat(tokenService).isInstanceOf(CSPTokenService.class);
|
||||
assertThat(sender).extracting("tokenService").isInstanceOf(CSPTokenService.class);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -153,8 +150,7 @@ class WavefrontSenderConfigurationTests {
|
|||
"management.wavefront.api-token=clientid=cid,clientsecret=csec")
|
||||
.run((context) -> {
|
||||
WavefrontSender sender = context.getBean(WavefrontSender.class);
|
||||
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
|
||||
assertThat(tokenService).isInstanceOf(CSPTokenService.class);
|
||||
assertThat(sender).extracting("tokenService").isInstanceOf(CSPTokenService.class);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -162,8 +158,7 @@ class WavefrontSenderConfigurationTests {
|
|||
void shouldApplyTokenTypeNoToken() {
|
||||
this.contextRunner.withPropertyValues("management.wavefront.api-token-type=NO_TOKEN").run((context) -> {
|
||||
WavefrontSender sender = context.getBean(WavefrontSender.class);
|
||||
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
|
||||
assertThat(tokenService).isInstanceOf(NoopProxyTokenService.class);
|
||||
assertThat(sender).extracting("tokenService").isInstanceOf(NoopProxyTokenService.class);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class MailHealthIndicatorTests {
|
|||
assertThat(health.getDetails()).doesNotContainKey("location");
|
||||
Object errorMessage = health.getDetails().get("error");
|
||||
assertThat(errorMessage).isNotNull();
|
||||
assertThat(errorMessage.toString().contains("A test exception")).isTrue();
|
||||
assertThat(errorMessage.toString()).contains("A test exception");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -104,7 +104,7 @@ class MailHealthIndicatorTests {
|
|||
assertThat(health.getDetails().get("location")).isEqualTo(":1234");
|
||||
Object errorMessage = health.getDetails().get("error");
|
||||
assertThat(errorMessage).isNotNull();
|
||||
assertThat(errorMessage.toString().contains("A test exception")).isTrue();
|
||||
assertThat(errorMessage.toString()).contains("A test exception");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -125,7 +125,7 @@ class MailHealthIndicatorTests {
|
|||
assertThat(health.getDetails()).containsEntry("location", "smtp.acme.org");
|
||||
Object errorMessage = health.getDetails().get("error");
|
||||
assertThat(errorMessage).isNotNull();
|
||||
assertThat(errorMessage.toString().contains("A test exception")).isTrue();
|
||||
assertThat(errorMessage.toString()).contains("A test exception");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -97,9 +97,9 @@ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
|
|||
org.springframework.boot.autoconfigure.pulsar.PulsarAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.pulsar.PulsarReactiveAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.r2dbc.R2dbcTransactionManagerAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration
|
||||
|
|
|
@ -304,7 +304,7 @@ class JacksonAutoConfigurationTests {
|
|||
|
||||
@Test
|
||||
void disableJsonNodeFeature() {
|
||||
this.contextRunner.withPropertyValues("spring.jackson.datatype.jsonnode.write-null-properties:false")
|
||||
this.contextRunner.withPropertyValues("spring.jackson.datatype.json-node.write-null-properties:false")
|
||||
.run((context) -> {
|
||||
ObjectMapper mapper = context.getBean(ObjectMapper.class);
|
||||
assertThat(JsonNodeFeature.WRITE_NULL_PROPERTIES.enabledByDefault()).isTrue();
|
||||
|
|
|
@ -68,7 +68,7 @@ class RestTemplateAutoConfigurationTests {
|
|||
|
||||
@Test
|
||||
void shouldFailOnCustomRestTemplateBuilderConfigurer() {
|
||||
this.contextRunner.withUserConfiguration(RestTemplateCustomConfigurerConfig.class)
|
||||
this.contextRunner.withUserConfiguration(RestTemplateBuilderConfigurerConfig.class)
|
||||
.run((context) -> assertThat(context).getFailure()
|
||||
.isInstanceOf(BeanDefinitionOverrideException.class)
|
||||
.hasMessageContaining("with name 'restTemplateBuilderConfigurer'"));
|
||||
|
@ -273,7 +273,7 @@ class RestTemplateAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
static class RestTemplateCustomConfigurerConfig {
|
||||
static class RestTemplateBuilderConfigurerConfig {
|
||||
|
||||
@Bean
|
||||
RestTemplateBuilderConfigurer restTemplateBuilderConfigurer() {
|
||||
|
|
|
@ -35,4 +35,4 @@ With this Docker Compose file in place, the JDBC URL used is `jdbc:postgresql://
|
|||
If you want to share services between multiple applications, create the `compose.yaml` file in one of the applications and then use the configuration property configprop:spring.docker.compose.file[] in the other applications to reference the `compose.yaml` file.
|
||||
You should also set configprop:spring.docker.compose.lifecycle-management[] to `start-only`, as it defaults to `start-and-stop` and stopping one application would shut down the shared services for the other still running applications, too.
|
||||
Setting it to `start-only` won't stop the shared services on application stop, but a caveat is that if you shut down all applications, the services stay running.
|
||||
You can stop the services manually by running `docker compose stop` on the commandline in the directory which contains the `compose.yaml` file.
|
||||
You can stop the services manually by running `docker compose stop` on the command line in the directory which contains the `compose.yaml` file.
|
||||
|
|
|
@ -75,7 +75,7 @@ These features are described in several enums (in Jackson) that map onto propert
|
|||
| `true`, `false`
|
||||
|
||||
| `com.fasterxml.jackson.databind.cfg.JsonNodeFeature`
|
||||
| `spring.jackson.datatype.jsonnode.<feature_name>`
|
||||
| `spring.jackson.datatype.json-node.<feature_name>`
|
||||
| `true`, `false`
|
||||
|
||||
| `com.fasterxml.jackson.databind.DeserializationFeature`
|
||||
|
|
|
@ -12,7 +12,7 @@ If you have Spring WebFlux on your classpath we recommend that you use `WebClien
|
|||
The `WebClient` interface provides a functional style API and is fully reactive.
|
||||
You can learn more about the `WebClient` in the dedicated {spring-framework-docs}/web/webflux-webclient.html[section in the Spring Framework docs].
|
||||
|
||||
TIP: If you are not writing a reactive Spring WebFlux application you can use the a <<io#io.rest-client.restclient,`RestClient`>> instead of a `WebClient`.
|
||||
TIP: If you are not writing a reactive Spring WebFlux application you can use the <<io#io.rest-client.restclient,`RestClient`>> instead of a `WebClient`.
|
||||
This provides a similar functional API, but is blocking rather than reactive.
|
||||
|
||||
Spring Boot creates and pre-configures a prototype `WebClient.Builder` bean for you.
|
||||
|
|
|
@ -271,7 +271,7 @@ Usually, you would define the properties in your `application.properties` or `ap
|
|||
|
||||
Common server settings include:
|
||||
|
||||
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to `server.address`, and so on.
|
||||
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to (`server.address`), and so on.
|
||||
* Error management: Location of the error page (`server.error.path`) and so on.
|
||||
* <<howto#howto.webserver.configure-ssl,SSL>>
|
||||
* <<howto#howto.webserver.enable-response-compression,HTTP compression>>
|
||||
|
@ -291,7 +291,7 @@ The following example shows programmatically setting the port:
|
|||
|
||||
include::code:MyWebServerFactoryCustomizer[]
|
||||
|
||||
`JettyReactiveWebServerFactory`, `NettyReactiveWebServerFactory`, `TomcatReactiveWebServerFactory`, and `UndertowServletWebServerFactory` are dedicated variants of `ConfigurableReactiveWebServerFactory` that have additional customization setter methods for Jetty, Reactor Netty, Tomcat, and Undertow respectively.
|
||||
`JettyReactiveWebServerFactory`, `NettyReactiveWebServerFactory`, `TomcatReactiveWebServerFactory`, and `UndertowReactiveWebServerFactory` are dedicated variants of `ConfigurableReactiveWebServerFactory` that have additional customization setter methods for Jetty, Reactor Netty, Tomcat, and Undertow respectively.
|
||||
The following example shows how to customize `NettyReactiveWebServerFactory` that provides access to Reactor Netty-specific configuration options:
|
||||
|
||||
include::code:MyNettyWebServerFactoryCustomizer[]
|
||||
|
|
|
@ -575,7 +575,7 @@ Usually, you would define the properties in your `application.properties` or `ap
|
|||
|
||||
Common server settings include:
|
||||
|
||||
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to `server.address`, and so on.
|
||||
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to (`server.address`), and so on.
|
||||
* Session settings: Whether the session is persistent (`server.servlet.session.persistent`), session timeout (`server.servlet.session.timeout`), location of session data (`server.servlet.session.store-dir`), and session-cookie configuration (`server.servlet.session.cookie.*`).
|
||||
* Error management: Location of the error page (`server.error.path`) and so on.
|
||||
* <<howto#howto.webserver.configure-ssl,SSL>>
|
||||
|
|
|
@ -30,7 +30,7 @@ bom {
|
|||
library("C3P0", "0.9.5.5") {
|
||||
group("com.mchange") {
|
||||
modules = [
|
||||
"c3p0"
|
||||
"c3p0"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ bom {
|
|||
library("Micrometer Context Propagation", "1.0.5") {
|
||||
group("io.micrometer") {
|
||||
modules = [
|
||||
"context-propagation"
|
||||
"context-propagation"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,9 +210,4 @@ class SpringBootMockMvcBuilderCustomizerTests {
|
|||
|
||||
}
|
||||
|
||||
static record RegisteredFilter(Filter filter, Map<String, String> initParameters,
|
||||
EnumSet<DispatcherType> dispatcherTypes) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -40,8 +40,8 @@ import org.springframework.boot.loader.log.DebugLogger;
|
|||
* contains. Unlike {@link java.util.zip.ZipFile}, this implementation can load content
|
||||
* from a zip file nested inside another file as long as the entry is not compressed.
|
||||
* <p>
|
||||
* In order to reduce memory consumption, this implementation stores only the the hash of
|
||||
* the entry names, the central directory offsets and the original positions. Entries are
|
||||
* In order to reduce memory consumption, this implementation stores only the hash of the
|
||||
* entry names, the central directory offsets and the original positions. Entries are
|
||||
* stored internally in {@code hashCode} order so that a binary search can be used to
|
||||
* quickly find an entry by name or determine if the zip file doesn't have a given entry.
|
||||
* <p>
|
||||
|
|
|
@ -1300,7 +1300,8 @@ public class SpringApplication {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether to keep the application alive even if there are no more non-daemon threads.
|
||||
* Set whether to keep the application alive even if there are no more non-daemon
|
||||
* threads.
|
||||
* @param keepAlive whether to keep the application alive even if there are no more
|
||||
* non-daemon threads
|
||||
* @since 3.2.0
|
||||
|
|
Loading…
Reference in New Issue