commit
1ad5fb8638
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -118,7 +118,7 @@ class HealthEndpointWebExtensionConfiguration {
|
||||||
static class JerseyInfrastructureConfiguration {
|
static class JerseyInfrastructureConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(JerseyApplicationPath.class)
|
@ConditionalOnMissingBean
|
||||||
JerseyApplicationPath jerseyApplicationPath(JerseyProperties properties, ResourceConfig config) {
|
JerseyApplicationPath jerseyApplicationPath(JerseyProperties properties, ResourceConfig config) {
|
||||||
return new DefaultJerseyApplicationPath(properties.getApplicationPath(), config);
|
return new DefaultJerseyApplicationPath(properties.getApplicationPath(), config);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2022 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -60,7 +60,7 @@ public class JerseySameManagementContextConfiguration {
|
||||||
static class JerseyInfrastructureConfiguration {
|
static class JerseyInfrastructureConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(JerseyApplicationPath.class)
|
@ConditionalOnMissingBean
|
||||||
JerseyApplicationPath jerseyApplicationPath(JerseyProperties properties, ResourceConfig config) {
|
JerseyApplicationPath jerseyApplicationPath(JerseyProperties properties, ResourceConfig config) {
|
||||||
return new DefaultJerseyApplicationPath(properties.getApplicationPath(), config);
|
return new DefaultJerseyApplicationPath(properties.getApplicationPath(), config);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public class RabbitAutoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(RabbitConnectionDetails.class)
|
@ConditionalOnMissingBean
|
||||||
RabbitConnectionDetails rabbitConnectionDetails() {
|
RabbitConnectionDetails rabbitConnectionDetails() {
|
||||||
return new PropertiesRabbitConnectionDetails(this.properties);
|
return new PropertiesRabbitConnectionDetails(this.properties);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ public class BatchAutoConfiguration {
|
||||||
static class DataSourceInitializerConfiguration {
|
static class DataSourceInitializerConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(BatchDataSourceScriptDatabaseInitializer.class)
|
@ConditionalOnMissingBean
|
||||||
BatchDataSourceScriptDatabaseInitializer batchDataSourceInitializer(DataSource dataSource,
|
BatchDataSourceScriptDatabaseInitializer batchDataSourceInitializer(DataSource dataSource,
|
||||||
@BatchDataSource ObjectProvider<DataSource> batchDataSource, BatchProperties properties) {
|
@BatchDataSource ObjectProvider<DataSource> batchDataSource, BatchProperties properties) {
|
||||||
return new BatchDataSourceScriptDatabaseInitializer(batchDataSource.getIfAvailable(() -> dataSource),
|
return new BatchDataSourceScriptDatabaseInitializer(batchDataSource.getIfAvailable(() -> dataSource),
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ public class IntegrationAutoConfiguration {
|
||||||
protected static class IntegrationJdbcConfiguration {
|
protected static class IntegrationJdbcConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(IntegrationDataSourceScriptDatabaseInitializer.class)
|
@ConditionalOnMissingBean
|
||||||
public IntegrationDataSourceScriptDatabaseInitializer integrationDataSourceInitializer(DataSource dataSource,
|
public IntegrationDataSourceScriptDatabaseInitializer integrationDataSourceInitializer(DataSource dataSource,
|
||||||
IntegrationProperties properties) {
|
IntegrationProperties properties) {
|
||||||
return new IntegrationDataSourceScriptDatabaseInitializer(dataSource, properties.getJdbc());
|
return new IntegrationDataSourceScriptDatabaseInitializer(dataSource, properties.getJdbc());
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -47,7 +47,7 @@ import org.springframework.context.annotation.Import;
|
||||||
public class ActiveMQAutoConfiguration {
|
public class ActiveMQAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(ActiveMQConnectionDetails.class)
|
@ConditionalOnMissingBean
|
||||||
ActiveMQConnectionDetails activemqConnectionDetails(ActiveMQProperties properties) {
|
ActiveMQConnectionDetails activemqConnectionDetails(ActiveMQProperties properties) {
|
||||||
return new PropertiesActiveMQConnectionDetails(properties);
|
return new PropertiesActiveMQConnectionDetails(properties);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ import org.springframework.context.annotation.Import;
|
||||||
public class ArtemisAutoConfiguration {
|
public class ArtemisAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(ArtemisConnectionDetails.class)
|
@ConditionalOnMissingBean
|
||||||
ArtemisConnectionDetails artemisConnectionDetails(ArtemisProperties properties) {
|
ArtemisConnectionDetails artemisConnectionDetails(ArtemisProperties properties) {
|
||||||
return new PropertiesArtemisConnectionDetails(properties);
|
return new PropertiesArtemisConnectionDetails(properties);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class JooqAutoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(ExceptionTranslatorExecuteListener.class)
|
@ConditionalOnMissingBean
|
||||||
public ExceptionTranslatorExecuteListener jooqExceptionTranslator() {
|
public ExceptionTranslatorExecuteListener jooqExceptionTranslator() {
|
||||||
return ExceptionTranslatorExecuteListener.DEFAULT;
|
return ExceptionTranslatorExecuteListener.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -53,7 +53,7 @@ public class MongoAutoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(MongoClient.class)
|
@ConditionalOnMissingBean
|
||||||
public MongoClient mongo(ObjectProvider<MongoClientSettingsBuilderCustomizer> builderCustomizers,
|
public MongoClient mongo(ObjectProvider<MongoClientSettingsBuilderCustomizer> builderCustomizers,
|
||||||
MongoClientSettings settings) {
|
MongoClientSettings settings) {
|
||||||
return new MongoClientFactory(builderCustomizers.orderedStream().toList()).createMongoClient(settings);
|
return new MongoClientFactory(builderCustomizers.orderedStream().toList()).createMongoClient(settings);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2022 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -132,7 +132,7 @@ public class QuartzAutoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(QuartzDataSourceScriptDatabaseInitializer.class)
|
@ConditionalOnMissingBean
|
||||||
@Conditional(OnQuartzDatasourceInitializationCondition.class)
|
@Conditional(OnQuartzDatasourceInitializationCondition.class)
|
||||||
public QuartzDataSourceScriptDatabaseInitializer quartzDataSourceScriptDatabaseInitializer(
|
public QuartzDataSourceScriptDatabaseInitializer quartzDataSourceScriptDatabaseInitializer(
|
||||||
DataSource dataSource, @QuartzDataSource ObjectProvider<DataSource> quartzDataSource,
|
DataSource dataSource, @QuartzDataSource ObjectProvider<DataSource> quartzDataSource,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -56,7 +56,7 @@ import org.springframework.session.jdbc.config.annotation.web.http.JdbcHttpSessi
|
||||||
class JdbcSessionConfiguration {
|
class JdbcSessionConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(JdbcSessionDataSourceScriptDatabaseInitializer.class)
|
@ConditionalOnMissingBean
|
||||||
@Conditional(OnJdbcSessionDatasourceInitializationCondition.class)
|
@Conditional(OnJdbcSessionDatasourceInitializationCondition.class)
|
||||||
JdbcSessionDataSourceScriptDatabaseInitializer jdbcSessionDataSourceScriptDatabaseInitializer(
|
JdbcSessionDataSourceScriptDatabaseInitializer jdbcSessionDataSourceScriptDatabaseInitializer(
|
||||||
@SpringSessionDataSource ObjectProvider<DataSource> sessionDataSource,
|
@SpringSessionDataSource ObjectProvider<DataSource> sessionDataSource,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -52,7 +52,7 @@ public class ClientHttpConnectorAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Lazy
|
@Lazy
|
||||||
@ConditionalOnMissingBean(ClientHttpConnector.class)
|
@ConditionalOnMissingBean
|
||||||
ClientHttpConnector webClientHttpConnector(ClientHttpConnectorFactory<?> clientHttpConnectorFactory) {
|
ClientHttpConnector webClientHttpConnector(ClientHttpConnectorFactory<?> clientHttpConnectorFactory) {
|
||||||
return clientHttpConnectorFactory.createClientHttpConnector();
|
return clientHttpConnectorFactory.createClientHttpConnector();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -63,7 +63,7 @@ public class MultipartAutoConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(MultipartConfigElement.class)
|
@ConditionalOnMissingBean
|
||||||
public MultipartConfigElement multipartConfigElement() {
|
public MultipartConfigElement multipartConfigElement() {
|
||||||
return this.multipartProperties.createMultipartConfig();
|
return this.multipartProperties.createMultipartConfig();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 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.
|
||||||
|
|
@ -495,7 +495,7 @@ class ConditionalOnMissingBeanTests {
|
||||||
static class ConditionalOnFactoryBean {
|
static class ConditionalOnFactoryBean {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(ExampleBean.class)
|
@ConditionalOnMissingBean
|
||||||
ExampleBean createExampleBean() {
|
ExampleBean createExampleBean() {
|
||||||
return new ExampleBean("direct");
|
return new ExampleBean("direct");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue