Create spring-boot-integration module
This commit is contained in:
committed by
Phillip Webb
parent
0d5a141a41
commit
cf7d8332e2
@@ -56,6 +56,7 @@ include "spring-boot-project:spring-boot-elasticsearch"
|
||||
include "spring-boot-project:spring-boot-flyway"
|
||||
include "spring-boot-project:spring-boot-freemarker"
|
||||
include "spring-boot-project:spring-boot-groovy-templates"
|
||||
include "spring-boot-project:spring-boot-integration"
|
||||
include "spring-boot-project:spring-boot-jackson"
|
||||
include "spring-boot-project:spring-boot-jdbc"
|
||||
include "spring-boot-project:spring-boot-jetty"
|
||||
|
||||
@@ -23,6 +23,7 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-data-jpa"))
|
||||
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-integration"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
@@ -132,7 +133,6 @@ dependencies {
|
||||
optional("org.springframework.data:spring-data-redis")
|
||||
optional("org.springframework.data:spring-data-elasticsearch")
|
||||
optional("org.springframework.graphql:spring-graphql")
|
||||
optional("org.springframework.integration:spring-integration-core")
|
||||
optional("org.springframework.kafka:spring-kafka")
|
||||
optional("org.springframework.security:spring-security-config")
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.integration.config.IntegrationConfigurationBeanFactoryPostProcessor;
|
||||
import org.springframework.integration.graph.IntegrationGraphServer;
|
||||
@@ -36,7 +35,7 @@ import org.springframework.integration.graph.IntegrationGraphServer;
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
*/
|
||||
@AutoConfiguration(after = IntegrationAutoConfiguration.class)
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration")
|
||||
@ConditionalOnClass(IntegrationGraphServer.class)
|
||||
@ConditionalOnBean(IntegrationConfigurationBeanFactoryPostProcessor.class)
|
||||
@ConditionalOnAvailableEndpoint(IntegrationGraphEndpoint.class)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
* Copyright 2012-2025 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.
|
||||
@@ -22,7 +22,6 @@ import org.springframework.boot.actuate.autoconfigure.metrics.CompositeMeterRegi
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for Spring Integration's metrics.
|
||||
@@ -32,8 +31,8 @@ import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfigu
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
*/
|
||||
@AutoConfiguration(after = { MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class },
|
||||
before = IntegrationAutoConfiguration.class)
|
||||
@AutoConfiguration(beforeName = "org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration",
|
||||
after = { MetricsAutoConfiguration.class, CompositeMeterRegistryAutoConfiguration.class })
|
||||
class IntegrationMetricsAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||
import org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.integration.graph.IntegrationGraphServer;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.actuate.autoconfigure.integration.IntegrationGraphEndpointAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration;
|
||||
import org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -25,6 +25,7 @@ dependencies {
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-integration"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jetty"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
@@ -90,7 +91,6 @@ dependencies {
|
||||
optional("org.springframework.data:spring-data-mongodb")
|
||||
optional("org.springframework.data:spring-data-redis")
|
||||
optional("org.springframework.data:spring-data-rest-webmvc")
|
||||
optional("org.springframework.integration:spring-integration-core")
|
||||
optional("org.springframework.security:spring-security-core")
|
||||
optional("org.springframework.security:spring-security-web")
|
||||
optional("org.springframework.session:spring-session-core")
|
||||
|
||||
@@ -146,10 +146,6 @@ dependencies {
|
||||
optional("org.opensaml:opensaml-saml-api:4.0.1")
|
||||
optional("org.opensaml:opensaml-saml-impl:4.0.1")
|
||||
optional("org.quartz-scheduler:quartz")
|
||||
optional("org.springframework.integration:spring-integration-core")
|
||||
optional("org.springframework.integration:spring-integration-jdbc")
|
||||
optional("org.springframework.integration:spring-integration-jmx")
|
||||
optional("org.springframework.integration:spring-integration-rsocket")
|
||||
optional("org.springframework:spring-aspects")
|
||||
optional("org.springframework:spring-jdbc")
|
||||
optional("org.springframework:spring-jms")
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
# Environment Post Processors
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||
org.springframework.boot.autoconfigure.integration.IntegrationPropertiesEnvironmentPostProcessor
|
||||
|
||||
# Background Preinitializers
|
||||
org.springframework.boot.autoconfigure.preinitialize.BackgroundPreinitializer=\
|
||||
org.springframework.boot.autoconfigure.http.MessageConverterBackgroundPreinitializer
|
||||
|
||||
@@ -54,7 +54,6 @@ org.springframework.boot.autoconfigure.http.client.service.HttpServiceClientAuto
|
||||
org.springframework.boot.autoconfigure.http.client.reactive.ClientHttpConnectorAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.http.client.reactive.service.ReactiveHttpServiceClientAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration
|
||||
|
||||
@@ -1991,6 +1991,7 @@ bom {
|
||||
"spring-boot-flyway",
|
||||
"spring-boot-freemarker",
|
||||
"spring-boot-groovy-templates",
|
||||
"spring-boot-integration",
|
||||
"spring-boot-jackson",
|
||||
"spring-boot-jarmode-tools",
|
||||
"spring-boot-jdbc",
|
||||
|
||||
@@ -70,6 +70,7 @@ dependencies {
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-freemarker", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-integration", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "autoConfigurationMetadata"))
|
||||
@@ -103,6 +104,7 @@ dependencies {
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-freemarker", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-integration", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-jpa", configuration: "configurationPropertiesMetadata"))
|
||||
@@ -130,6 +132,7 @@ dependencies {
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-autoconfigure-all"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-devtools"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-docker-compose"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-integration"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-jackson"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-jdbc"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-jpa"))
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.boot.docs.testing.springbootapplications.additionalautoconfigurationandslicing;
|
||||
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration;
|
||||
import org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration;
|
||||
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest;
|
||||
|
||||
@JdbcTest
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.boot.docs.testing.springbootapplications.additionalautoconfigurationandslicing
|
||||
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration
|
||||
import org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration
|
||||
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest
|
||||
|
||||
@JdbcTest
|
||||
|
||||
31
spring-boot-project/spring-boot-integration/build.gradle
Normal file
31
spring-boot-project/spring-boot-integration/build.gradle
Normal file
@@ -0,0 +1,31 @@
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot Integration"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("org.springframework.integration:spring-integration-core")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-rsocket"))
|
||||
optional("org.springframework.integration:spring-integration-jdbc")
|
||||
optional("org.springframework.integration:spring-integration-jmx")
|
||||
optional("org.springframework.integration:spring-integration-rsocket")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-flyway"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-rsocket"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
|
||||
testRuntimeOnly(project(":spring-boot-project:spring-boot-reactor-netty"))
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
testRuntimeOnly("com.h2database:h2")
|
||||
testRuntimeOnly("com.zaxxer:HikariCP")
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -42,6 +42,7 @@ import org.springframework.boot.autoconfigure.thread.Threading;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
||||
import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer;
|
||||
import org.springframework.boot.task.SimpleAsyncTaskSchedulerBuilder;
|
||||
import org.springframework.boot.task.ThreadPoolTaskSchedulerBuilder;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -263,7 +264,7 @@ public class IntegrationAutoConfiguration {
|
||||
* Integration JDBC configuration.
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(JdbcMessageStore.class)
|
||||
@ConditionalOnClass({ JdbcMessageStore.class, DataSourceScriptDatabaseInitializer.class })
|
||||
@ConditionalOnSingleCandidate(DataSource.class)
|
||||
@Conditional(OnIntegrationDatasourceInitializationCondition.class)
|
||||
protected static class IntegrationJdbcConfiguration {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.net.URI;
|
||||
import java.time.Duration;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import org.springframework.integration.scheduling.PollerMetadata;
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Auto-configuration for Spring Integration.
|
||||
*/
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
@@ -0,0 +1,3 @@
|
||||
# Environment Post Processors
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||
org.springframework.boot.integration.autoconfigure.IntegrationPropertiesEnvironmentPostProcessor
|
||||
@@ -0,0 +1 @@
|
||||
org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.time.Duration;
|
||||
@@ -39,12 +39,12 @@ import reactor.core.publisher.Mono;
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.PropertyAccessorFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration.IntegrationComponentScanConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
|
||||
import org.springframework.boot.context.annotation.UserConfigurations;
|
||||
import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.integration.autoconfigure.IntegrationAutoConfiguration.IntegrationComponentScanConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
|
||||
@@ -155,7 +155,7 @@ class IntegrationAutoConfigurationTests {
|
||||
this.contextRunner.withPropertyValues("spring.jmx.enabled=true").run((context) -> {
|
||||
MBeanServer mBeanServer = context.getBean(MBeanServer.class);
|
||||
assertThat(mBeanServer.getDomains()).contains("org.springframework.integration",
|
||||
"org.springframework.boot.autoconfigure.integration");
|
||||
"org.springframework.boot.integration.autoconfigure");
|
||||
assertThat(context).hasBean(IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME);
|
||||
});
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.integration;
|
||||
package org.springframework.boot.integration.autoconfigure;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.lang.reflect.Modifier;
|
||||
@@ -160,11 +160,11 @@ class IntegrationPropertiesEnvironmentPostProcessorTests {
|
||||
@MethodSource("mappedConfigurationProperties")
|
||||
@ParameterizedTest
|
||||
void mappedPropertiesExistOnBootsIntegrationProperties(String mapping) {
|
||||
Bindable<org.springframework.boot.autoconfigure.integration.IntegrationProperties> bindable = Bindable
|
||||
.of(org.springframework.boot.autoconfigure.integration.IntegrationProperties.class);
|
||||
Bindable<org.springframework.boot.integration.autoconfigure.IntegrationProperties> bindable = Bindable
|
||||
.of(org.springframework.boot.integration.autoconfigure.IntegrationProperties.class);
|
||||
MockEnvironment environment = new MockEnvironment().withProperty(mapping,
|
||||
(mapping.contains("max") || mapping.contains("timeout")) ? "1" : "true");
|
||||
BindResult<org.springframework.boot.autoconfigure.integration.IntegrationProperties> result = Binder
|
||||
BindResult<org.springframework.boot.integration.autoconfigure.IntegrationProperties> result = Binder
|
||||
.get(environment)
|
||||
.bind("spring.integration", bindable);
|
||||
assertThat(result.isBound()).isTrue();
|
||||
@@ -5,7 +5,7 @@ plugins {
|
||||
description = "Starter for using Spring Integration"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-integration"))
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||
api(project(":spring-boot-project:spring-boot-tx"))
|
||||
api("org.springframework.integration:spring-integration-core")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user