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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -118,7 +118,7 @@ class HealthEndpointWebExtensionConfiguration {
|
|||
static class JerseyInfrastructureConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(JerseyApplicationPath.class)
|
||||
@ConditionalOnMissingBean
|
||||
JerseyApplicationPath jerseyApplicationPath(JerseyProperties properties, ResourceConfig 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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -60,7 +60,7 @@ public class JerseySameManagementContextConfiguration {
|
|||
static class JerseyInfrastructureConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(JerseyApplicationPath.class)
|
||||
@ConditionalOnMissingBean
|
||||
JerseyApplicationPath jerseyApplicationPath(JerseyProperties properties, ResourceConfig config) {
|
||||
return new DefaultJerseyApplicationPath(properties.getApplicationPath(), config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class RabbitAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(RabbitConnectionDetails.class)
|
||||
@ConditionalOnMissingBean
|
||||
RabbitConnectionDetails rabbitConnectionDetails() {
|
||||
return new PropertiesRabbitConnectionDetails(this.properties);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ public class BatchAutoConfiguration {
|
|||
static class DataSourceInitializerConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(BatchDataSourceScriptDatabaseInitializer.class)
|
||||
@ConditionalOnMissingBean
|
||||
BatchDataSourceScriptDatabaseInitializer batchDataSourceInitializer(DataSource dataSource,
|
||||
@BatchDataSource ObjectProvider<DataSource> batchDataSource, BatchProperties properties) {
|
||||
return new BatchDataSourceScriptDatabaseInitializer(batchDataSource.getIfAvailable(() -> dataSource),
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ public class IntegrationAutoConfiguration {
|
|||
protected static class IntegrationJdbcConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(IntegrationDataSourceScriptDatabaseInitializer.class)
|
||||
@ConditionalOnMissingBean
|
||||
public IntegrationDataSourceScriptDatabaseInitializer integrationDataSourceInitializer(DataSource dataSource,
|
||||
IntegrationProperties properties) {
|
||||
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");
|
||||
* 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 {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(ActiveMQConnectionDetails.class)
|
||||
@ConditionalOnMissingBean
|
||||
ActiveMQConnectionDetails activemqConnectionDetails(ActiveMQProperties properties) {
|
||||
return new PropertiesActiveMQConnectionDetails(properties);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ import org.springframework.context.annotation.Import;
|
|||
public class ArtemisAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(ArtemisConnectionDetails.class)
|
||||
@ConditionalOnMissingBean
|
||||
ArtemisConnectionDetails artemisConnectionDetails(ArtemisProperties properties) {
|
||||
return new PropertiesArtemisConnectionDetails(properties);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class JooqAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(ExceptionTranslatorExecuteListener.class)
|
||||
@ConditionalOnMissingBean
|
||||
public ExceptionTranslatorExecuteListener jooqExceptionTranslator() {
|
||||
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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -53,7 +53,7 @@ public class MongoAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(MongoClient.class)
|
||||
@ConditionalOnMissingBean
|
||||
public MongoClient mongo(ObjectProvider<MongoClientSettingsBuilderCustomizer> builderCustomizers,
|
||||
MongoClientSettings 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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -132,7 +132,7 @@ public class QuartzAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(QuartzDataSourceScriptDatabaseInitializer.class)
|
||||
@ConditionalOnMissingBean
|
||||
@Conditional(OnQuartzDatasourceInitializationCondition.class)
|
||||
public QuartzDataSourceScriptDatabaseInitializer quartzDataSourceScriptDatabaseInitializer(
|
||||
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");
|
||||
* 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 {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(JdbcSessionDataSourceScriptDatabaseInitializer.class)
|
||||
@ConditionalOnMissingBean
|
||||
@Conditional(OnJdbcSessionDatasourceInitializationCondition.class)
|
||||
JdbcSessionDataSourceScriptDatabaseInitializer jdbcSessionDataSourceScriptDatabaseInitializer(
|
||||
@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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -52,7 +52,7 @@ public class ClientHttpConnectorAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
@Lazy
|
||||
@ConditionalOnMissingBean(ClientHttpConnector.class)
|
||||
@ConditionalOnMissingBean
|
||||
ClientHttpConnector webClientHttpConnector(ClientHttpConnectorFactory<?> clientHttpConnectorFactory) {
|
||||
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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -63,7 +63,7 @@ public class MultipartAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(MultipartConfigElement.class)
|
||||
@ConditionalOnMissingBean
|
||||
public MultipartConfigElement multipartConfigElement() {
|
||||
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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -495,7 +495,7 @@ class ConditionalOnMissingBeanTests {
|
|||
static class ConditionalOnFactoryBean {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(ExampleBean.class)
|
||||
@ConditionalOnMissingBean
|
||||
ExampleBean createExampleBean() {
|
||||
return new ExampleBean("direct");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue