mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Polish
See gh-37340
This commit is contained in:
parent
a9f26e0f95
commit
c2b78830ff
@ -73,8 +73,8 @@ dependencies {
|
||||
optional("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||
optional("io.projectreactor.netty:reactor-netty-http")
|
||||
optional("io.r2dbc:r2dbc-pool")
|
||||
optional("io.r2dbc:r2dbc-spi")
|
||||
optional("io.r2dbc:r2dbc-proxy")
|
||||
optional("io.r2dbc:r2dbc-spi")
|
||||
optional("jakarta.jms:jakarta.jms-api")
|
||||
optional("jakarta.persistence:jakarta.persistence-api")
|
||||
optional("jakarta.servlet:jakarta.servlet-api")
|
||||
|
@ -68,7 +68,7 @@ class SignalFxPropertiesConfigAdapterTests
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesPublishHistogramTypeIsCumulativePublishCumulativeHistogramReturnsIt() {
|
||||
void whenPropertiesPublishHistogramTypeIsCumulativeAdapterPublishCumulativeHistogramReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setPublishedHistogramType(HistogramType.CUMULATIVE);
|
||||
assertThat(createConfigAdapter(properties).publishCumulativeHistogram()).isTrue();
|
||||
@ -76,7 +76,7 @@ class SignalFxPropertiesConfigAdapterTests
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenPropertiesPublishHistogramTypeIsDeltaPublishDeltaHistogramReturnsIt() {
|
||||
void whenPropertiesPublishHistogramTypeIsDeltaAdapterPublishDeltaHistogramReturnsIt() {
|
||||
SignalFxProperties properties = createProperties();
|
||||
properties.setPublishedHistogramType(HistogramType.DELTA);
|
||||
assertThat(createConfigAdapter(properties).publishDeltaHistogram()).isTrue();
|
||||
|
@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class ObservationHandlerGroupingTests {
|
||||
|
||||
@Test
|
||||
void shouldGroupCategoriesIntoFirstMatchingHandlerAndRespectsCategoryOrder() {
|
||||
void shouldGroupCategoriesIntoFirstMatchingHandlerAndRespectCategoryOrder() {
|
||||
ObservationHandlerGrouping grouping = new ObservationHandlerGrouping(
|
||||
List.of(ObservationHandlerA.class, ObservationHandlerB.class));
|
||||
ObservationConfig config = new ObservationConfig();
|
||||
|
@ -541,8 +541,7 @@ class RabbitAutoConfigurationTests {
|
||||
this.contextRunner.withPropertyValues("spring.threads.virtual.enabled=true").run((context) -> {
|
||||
SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory = context
|
||||
.getBean("rabbitListenerContainerFactory", SimpleRabbitListenerContainerFactory.class);
|
||||
Object executor = ReflectionTestUtils.getField(rabbitListenerContainerFactory, "taskExecutor");
|
||||
assertThat(executor).as("rabbitListenerContainerFactory.taskExecutor")
|
||||
assertThat(rabbitListenerContainerFactory).extracting("taskExecutor")
|
||||
.isInstanceOf(VirtualThreadTaskExecutor.class);
|
||||
});
|
||||
}
|
||||
|
@ -43,7 +43,9 @@ class JdbcClientAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
void jdbcClientWhenNoAvailableJdbcTemplateIsNotCreated() {
|
||||
new ApplicationContextRunner().withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class))
|
||||
new ApplicationContextRunner()
|
||||
.withConfiguration(
|
||||
AutoConfigurations.of(DataSourceAutoConfiguration.class, JdbcClientAutoConfiguration.class))
|
||||
.run((context) -> assertThat(context).doesNotHaveBean(JdbcClient.class));
|
||||
}
|
||||
|
||||
@ -79,7 +81,7 @@ class JdbcClientAutoConfigurationTests {
|
||||
@Test
|
||||
void jdbcClientIsOrderedAfterLiquibaseMigration() {
|
||||
this.contextRunner.withUserConfiguration(JdbcClientDataSourceMigrationValidator.class)
|
||||
.withPropertyValues("spring.liquibase.changeLog:classpath:db/changelog/db.changelog-city.yaml")
|
||||
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-city.yaml")
|
||||
.withConfiguration(AutoConfigurations.of(LiquibaseAutoConfiguration.class))
|
||||
.run((context) -> {
|
||||
assertThat(context).hasNotFailed().hasSingleBean(JdbcClient.class);
|
||||
|
@ -184,7 +184,7 @@ class JdbcTemplateAutoConfigurationTests {
|
||||
@Test
|
||||
void testDependencyToLiquibase() {
|
||||
this.contextRunner.withUserConfiguration(DataSourceMigrationValidator.class)
|
||||
.withPropertyValues("spring.liquibase.changeLog:classpath:db/changelog/db.changelog-city.yaml")
|
||||
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-city.yaml")
|
||||
.withConfiguration(AutoConfigurations.of(LiquibaseAutoConfiguration.class))
|
||||
.run((context) -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@ -195,7 +195,7 @@ class JdbcTemplateAutoConfigurationTests {
|
||||
@Test
|
||||
void testDependencyToLiquibaseWithJdbcTemplateMixed() {
|
||||
this.contextRunner.withUserConfiguration(NamedParameterDataSourceMigrationValidator.class)
|
||||
.withPropertyValues("spring.liquibase.changeLog:classpath:db/changelog/db.changelog-city.yaml")
|
||||
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-city.yaml")
|
||||
.withConfiguration(AutoConfigurations.of(LiquibaseAutoConfiguration.class))
|
||||
.run((context) -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
@ -396,7 +396,7 @@ class LiquibaseAutoConfigurationTests {
|
||||
void rollbackFile(@TempDir Path temp) throws IOException {
|
||||
File file = Files.createTempFile(temp, "rollback-file", "sql").toFile();
|
||||
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
|
||||
.withPropertyValues("spring.liquibase.rollbackFile:" + file.getAbsolutePath())
|
||||
.withPropertyValues("spring.liquibase.rollback-file:" + file.getAbsolutePath())
|
||||
.run((context) -> {
|
||||
SpringLiquibase liquibase = context.getBean(SpringLiquibase.class);
|
||||
File actualFile = (File) ReflectionTestUtils.getField(liquibase, "rollbackFile");
|
||||
|
@ -153,7 +153,7 @@ class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigurationTes
|
||||
@Test
|
||||
void testLiquibasePlusValidation() {
|
||||
contextRunner()
|
||||
.withPropertyValues("spring.liquibase.changeLog:classpath:db/changelog/db.changelog-city.yaml",
|
||||
.withPropertyValues("spring.liquibase.change-log:classpath:db/changelog/db.changelog-city.yaml",
|
||||
"spring.jpa.hibernate.ddl-auto:validate")
|
||||
.withConfiguration(AutoConfigurations.of(LiquibaseAutoConfiguration.class))
|
||||
.run((context) -> assertThat(context).hasNotFailed());
|
||||
|
@ -1032,8 +1032,7 @@ class WebFluxAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import({ OrderedControllerAdviceBeansConfiguration.LowestOrderedControllerAdvice.class,
|
||||
OrderedControllerAdviceBeansConfiguration.HighestOrderedControllerAdvice.class })
|
||||
@Import({ LowestOrderedControllerAdvice.class, HighestOrderedControllerAdvice.class })
|
||||
static class OrderedControllerAdviceBeansConfiguration {
|
||||
|
||||
@ControllerAdvice
|
||||
|
@ -183,7 +183,7 @@ You can inject it directly in your own beans as well, as shown in the following
|
||||
|
||||
include::code:MyBean[]
|
||||
|
||||
If you rely on auto-configuration to create the underlying `JdbcTemplate`, any customization using `spring.jdbc.template.*` properties are taken into account in the client as well.
|
||||
If you rely on auto-configuration to create the underlying `JdbcTemplate`, any customization using `spring.jdbc.template.*` properties is taken into account in the client as well.
|
||||
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ class SampleJettyApplicationTests {
|
||||
ResponseEntity<String> entity = this.restTemplate.getForEntity("/", String.class);
|
||||
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
|
||||
assertThat(entity.getBody()).isEqualTo("Hello World");
|
||||
// Jetty HttpClient decodes gzip reponses automatically and removes the
|
||||
// Jetty HttpClient decodes gzip responses automatically and removes the
|
||||
// Content-Encoding header. We have to assume that the response was gzipped.
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user