From 7bb7bf13d0eeb259f67d9d2821d87d7a9fbef69d Mon Sep 17 00:00:00 2001 From: Gerard Klijs Date: Tue, 9 Jan 2024 15:15:27 +0100 Subject: [PATCH] Add autoconfiguration. --- .../pom.xml | 221 ++++++++++++++++++ .../TokenStoreIntegrationTest.java | 93 ++++++++ .../src/test/resources/log4j2.properties | 55 +++++ .../pom.xml | 84 +++++++ .../autoconfig/CosmosAutoConfiguration.java | 48 ++++ .../main/resources/META-INF/spring.factories | 2 + ...ot.autoconfigure.AutoConfiguration.imports | 1 + ...osmosAutoConfigurationIntegrationTest.java | 127 ++++++++++ .../src/test/resources/log4j2.properties | 55 +++++ axon-cosmosdb-spring-boot-starter/pom.xml | 50 ++++ .../pom.xml | 39 ---- coverage-report/pom.xml | 6 + pom.xml | 4 +- 13 files changed, 745 insertions(+), 40 deletions(-) create mode 100644 axon-cosmosdb-spring-boot-3-integrationtests/pom.xml create mode 100644 axon-cosmosdb-spring-boot-3-integrationtests/src/test/java/org/axonframework/extensions/cosmosdb/integration/TokenStoreIntegrationTest.java create mode 100644 axon-cosmosdb-spring-boot-3-integrationtests/src/test/resources/log4j2.properties create mode 100644 axon-cosmosdb-spring-boot-autoconfigure/pom.xml create mode 100644 axon-cosmosdb-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfiguration.java create mode 100644 axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories create mode 100644 axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 axon-cosmosdb-spring-boot-autoconfigure/src/test/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfigurationIntegrationTest.java create mode 100644 axon-cosmosdb-spring-boot-autoconfigure/src/test/resources/log4j2.properties create mode 100644 axon-cosmosdb-spring-boot-starter/pom.xml delete mode 100644 cosmosdb-spring-boot-3-integrationtests/pom.xml diff --git a/axon-cosmosdb-spring-boot-3-integrationtests/pom.xml b/axon-cosmosdb-spring-boot-3-integrationtests/pom.xml new file mode 100644 index 0000000..c1e6f5e --- /dev/null +++ b/axon-cosmosdb-spring-boot-3-integrationtests/pom.xml @@ -0,0 +1,221 @@ + + + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.2.1 + + + + axon-cosmosdb-spring-boot-3-integrationtests + org.axonframework.extensions.cosmosdb + + Axon Framework Cosmos DB Extension Spring Boot 3 Integration Tests + + Module used to test the integration with Spring Boot 3 + + 4.9.0-SNAPSHOT + + jar + + + 4.9.1 + 1.19.3 + 5.8.0 + + 0.8.11 + 3.3.0 + 3.2.3 + + + + + + org.axonframework + axon-eventsourcing + ${axon.version} + test-jar + test + + + org.axonframework + axon-spring-boot-autoconfigure + ${axon.version} + + + org.axonframework.extensions.cosmosdb + axon-cosmosdb-spring-boot-starter + ${project.version} + + + + com.azure.spring + spring-cloud-azure-starter-data-cosmos + ${spring-cloud-azure.version} + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-actuator + + + org.springframework.boot + spring-boot-starter-log4j2 + + + org.springframework.boot + spring-boot-starter-test + + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + test + + + + org.awaitility + awaitility + test + + + org.testcontainers + junit-jupiter + test + + + org.testcontainers + azure + test + + + org.testcontainers + testcontainers + test + + + + + + + org.testcontainers + testcontainers-bom + ${testcontainers.version} + pom + import + + + + + + + + + maven-compiler-plugin + + 17 + 17 + UTF-8 + true + true + + + + + maven-jar-plugin + ${maven-jar.version} + + + + true + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + true + + + + + + + + coverage + + + + org.jacoco + jacoco-maven-plugin + ${jacoco-maven.version} + + + + prepare-agent + + + + report + prepare-package + + report + + + + + + + + + coverage-aggregate + + verify + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire.version} + + true + + + + + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + \ No newline at end of file diff --git a/axon-cosmosdb-spring-boot-3-integrationtests/src/test/java/org/axonframework/extensions/cosmosdb/integration/TokenStoreIntegrationTest.java b/axon-cosmosdb-spring-boot-3-integrationtests/src/test/java/org/axonframework/extensions/cosmosdb/integration/TokenStoreIntegrationTest.java new file mode 100644 index 0000000..b747a8a --- /dev/null +++ b/axon-cosmosdb-spring-boot-3-integrationtests/src/test/java/org/axonframework/extensions/cosmosdb/integration/TokenStoreIntegrationTest.java @@ -0,0 +1,93 @@ +package org.axonframework.extensions.cosmosdb.integration; + +import org.axonframework.eventhandling.GlobalSequenceTrackingToken; +import org.axonframework.eventhandling.TrackingToken; +import org.axonframework.eventhandling.tokenstore.TokenStore; +import org.axonframework.extensions.cosmosdb.eventsourcing.tokenstore.CosmosTokenStore; +import org.junit.jupiter.api.*; +import org.junit.jupiter.api.io.*; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.context.annotation.EnableMBeanExport; +import org.springframework.jmx.support.RegistrationPolicy; +import org.springframework.test.context.ContextConfiguration; +import org.testcontainers.containers.CosmosDBEmulatorContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; +import org.testcontainers.utility.DockerImageName; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; + +import static org.junit.jupiter.api.Assertions.*; + +@Testcontainers +class TokenStoreIntegrationTest { + + @Container + private static final CosmosDBEmulatorContainer COSMOS_CONTAINER = new CosmosDBEmulatorContainer( + DockerImageName.parse("mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest") + ); + + @TempDir + private static Path tempFolder; + + private ApplicationContextRunner testApplicationContext; + + @BeforeAll + static void setup() throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException { + Path keyStoreFile = tempFolder.resolve("azure-cosmos-emulator.keystore"); + KeyStore keyStore = COSMOS_CONTAINER.buildNewKeyStore(); + keyStore.store(Files.newOutputStream(keyStoreFile.toFile().toPath()), + COSMOS_CONTAINER.getEmulatorKey().toCharArray()); + + System.setProperty("javax.net.ssl.trustStore", keyStoreFile.toString()); + System.setProperty("javax.net.ssl.trustStorePassword", COSMOS_CONTAINER.getEmulatorKey()); + System.setProperty("javax.net.ssl.trustStoreType", "PKCS12"); + } + + @BeforeEach + void setUp() { + testApplicationContext = new ApplicationContextRunner() + .withPropertyValues("axon.axonserver.enabled=false"); + } + + @Test + void tokenStoreWillUseCosmosDB() { + testApplicationContext + .withPropertyValues("spring.cloud.azure.cosmos.endpoint=" + COSMOS_CONTAINER.getEmulatorEndpoint()) + .withPropertyValues("spring.cloud.azure.cosmos.key=" + COSMOS_CONTAINER.getEmulatorKey()) + .withPropertyValues("spring.cloud.azure.cosmos.database=someProjection") + .withPropertyValues("spring.cloud.azure.cosmos.endpoint-discovery-enabled=false") + .withPropertyValues("spring.cloud.azure.cosmos.connection-mode=gateway") + .withUserConfiguration(DefaultContext.class) + .run(context -> { + TokenStore tokenStore = context.getBean(TokenStore.class); + assertNotNull(tokenStore); + assertInstanceOf(CosmosTokenStore.class, tokenStore); + testTokenStore(tokenStore); + }); + } + + private void testTokenStore(TokenStore tokenStore) { + String testProcessorName = "testProcessorName"; + int testSegment = 9; + tokenStore.initializeTokenSegments(testProcessorName, testSegment + 1); + assertNull(tokenStore.fetchToken(testProcessorName, testSegment)); + TrackingToken token = new GlobalSequenceTrackingToken(1L); + tokenStore.storeToken(token, testProcessorName, testSegment); + assertEquals(token, tokenStore.fetchToken(testProcessorName, testSegment)); + } + + @ContextConfiguration + @EnableAutoConfiguration + @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING) + public static class DefaultContext { + + } +} \ No newline at end of file diff --git a/axon-cosmosdb-spring-boot-3-integrationtests/src/test/resources/log4j2.properties b/axon-cosmosdb-spring-boot-3-integrationtests/src/test/resources/log4j2.properties new file mode 100644 index 0000000..a18fa99 --- /dev/null +++ b/axon-cosmosdb-spring-boot-3-integrationtests/src/test/resources/log4j2.properties @@ -0,0 +1,55 @@ +# +# Copyright (c) 2010-2022. Axon Framework +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name=AxonTestConfiguration +appenders=console +appender.console.type=Console +appender.console.name=STDOUT +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d [%t] %-5p %-30.30c{1} %x - %m%n +rootLogger.level=info +rootLogger.appenderRefs=stdout +rootLogger.appenderRef.stdout.ref=STDOUT +logger.axon.name=org.axonframework +logger.axon.level=INFO +logger.axon.additivity=false +logger.axon.appenderRefs=stdout +logger.axon.appenderRef.stdout.ref=STDOUT +logger.axon-server-connection-manager.name=org.axonframework.axonserver.connector.AxonServerConnectionManager +logger.axon-server-connection-manager.level=ERROR +logger.chaining-converter.name=org.axonframework.serialization.ChainingConverter +logger.chaining-converter.level=OFF +logger.tracking-event-processor.name=org.axonframework.eventhandling.TrackingEventProcessor +logger.tracking-event-processor.level=WARN +logger.hibernate.name=org.hibernate +logger.hibernate.level=WARN +logger.hibernate-sql-exception-helper.name=org.hibernate.engine.jdbc.spi.SqlExceptionHelper +logger.hibernate-sql-exception-helper.level=ERROR +logger.hikari.name=com.zaxxer.hikari +logger.hikari.level=WARN +logger.hikari-util.name=com.zaxxer.hikari.util +logger.hikari-util.level=ERROR +logger.spring-boot-test.name=org.springframework.boot.test +logger.spring-boot-test.level=WARN +logger.spring-context-annotation.name=org.springframework.context.annotation +logger.spring-context-annotation.level=WARN +logger.spring-context-support.name=org.springframework.context.support +logger.spring-context-support.level=WARN +logger.spring-data-repo-config.name=org.springframework.data.repository.config +logger.spring-data-repo-config.level=WARN +logger.spring-orm.name=org.springframework.orm +logger.spring-orm.level=WARN +logger.spring-test.name=org.springframework.test +logger.spring-test.level=WARN diff --git a/axon-cosmosdb-spring-boot-autoconfigure/pom.xml b/axon-cosmosdb-spring-boot-autoconfigure/pom.xml new file mode 100644 index 0000000..83d0e9b --- /dev/null +++ b/axon-cosmosdb-spring-boot-autoconfigure/pom.xml @@ -0,0 +1,84 @@ + + + + + 4.0.0 + + org.axonframework.extensions.cosmosdb + axon-cosmosdb-parent + 4.9.0-SNAPSHOT + + + axon-cosmosdb-spring-boot-autoconfigure + + Spring Boot support for Axon Framework Cosmos DB Extension + + Module providing support ofr autoconfiguration of the Axon Framework Cosmos DB Extension through Spring Boot. + + + jar + + + + + org.axonframework.extensions.cosmosdb + axon-cosmosdb + ${project.version} + + + org.axonframework + axon-spring-boot-autoconfigure + ${axon.version} + true + + + + org.springframework.boot + spring-boot-autoconfigure + true + + + org.springframework.boot + spring-boot-autoconfigure-processor + true + + + org.springframework.boot + spring-boot-starter + true + + + ch.qos.logback + logback-classic + + + org.apache.logging.log4j + log4j-to-slf4j + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + \ No newline at end of file diff --git a/axon-cosmosdb-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfiguration.java b/axon-cosmosdb-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfiguration.java new file mode 100644 index 0000000..f208ab1 --- /dev/null +++ b/axon-cosmosdb-spring-boot-autoconfigure/src/main/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfiguration.java @@ -0,0 +1,48 @@ +package org.axonframework.extensions.cosmosdb.springboot.autoconfig; + +import com.azure.cosmos.CosmosAsyncClient; +import org.axonframework.eventhandling.tokenstore.TokenStore; +import org.axonframework.extensions.cosmosdb.eventsourcing.tokenstore.CosmosTokenStore; +import org.axonframework.serialization.Serializer; +import org.axonframework.springboot.TokenStoreProperties; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; + +/** + * Cosmos autoconfiguration class for Axon Framework application. Constructs the components which can be supplied by the + * {@code axon-cosmosdb}. This is just the token store ({@link CosmosTokenStore}). + *

+ * + * @author Gerard Klijs-Nefkens + * @since 4.9.0 + */ +@AutoConfiguration +@EnableConfigurationProperties(TokenStoreProperties.class) +@AutoConfigureAfter(name = "org.axonframework.springboot.autoconfig.JdbcAutoConfiguration") +public class CosmosAutoConfiguration { + + private final TokenStoreProperties tokenStoreProperties; + + public CosmosAutoConfiguration( + TokenStoreProperties tokenStoreProperties + ) { + this.tokenStoreProperties = tokenStoreProperties; + } + + @Bean("tokenStore") + @ConditionalOnMissingBean(TokenStore.class) + public TokenStore tokenStore( + @Qualifier(value = "azureCosmosAsyncClient") CosmosAsyncClient client, + Serializer serializer + ) { + return CosmosTokenStore.builder() + .client(client) + .serializer(serializer) + .claimTimeout(tokenStoreProperties.getClaimTimeout()) + .build(); + } +} diff --git a/axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories b/axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..bc68b00 --- /dev/null +++ b/axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + org.axonframework.extensions.cosmosdb.springboot.autoconfig.CosmosAutoConfiguration \ No newline at end of file diff --git a/axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..1243605 --- /dev/null +++ b/axon-cosmosdb-spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +org.axonframework.extensions.cosmosdb.springboot.autoconfig.CosmosAutoConfiguration \ No newline at end of file diff --git a/axon-cosmosdb-spring-boot-autoconfigure/src/test/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfigurationIntegrationTest.java b/axon-cosmosdb-spring-boot-autoconfigure/src/test/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfigurationIntegrationTest.java new file mode 100644 index 0000000..272349d --- /dev/null +++ b/axon-cosmosdb-spring-boot-autoconfigure/src/test/java/org/axonframework/extensions/cosmosdb/springboot/autoconfig/CosmosAutoConfigurationIntegrationTest.java @@ -0,0 +1,127 @@ +package org.axonframework.extensions.cosmosdb.springboot.autoconfig; + +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosClientBuilder; +import org.axonframework.common.ReflectionUtils; +import org.axonframework.eventhandling.GlobalSequenceTrackingToken; +import org.axonframework.eventhandling.TrackingToken; +import org.axonframework.eventhandling.tokenstore.TokenStore; +import org.axonframework.extensions.cosmosdb.eventsourcing.tokenstore.CosmosTokenStore; +import org.axonframework.serialization.Serializer; +import org.axonframework.serialization.json.JacksonSerializer; +import org.junit.jupiter.api.*; +import org.junit.jupiter.api.io.*; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.EnableMBeanExport; +import org.springframework.context.annotation.Primary; +import org.springframework.jmx.support.RegistrationPolicy; +import org.springframework.test.context.ContextConfiguration; +import org.testcontainers.containers.CosmosDBEmulatorContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; +import org.testcontainers.utility.DockerImageName; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.time.Duration; +import java.time.temporal.TemporalAmount; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.*; + +@Testcontainers +class CosmosAutoConfigurationIntegrationTest { + + @Container + private static final CosmosDBEmulatorContainer COSMOS_CONTAINER = new CosmosDBEmulatorContainer( + DockerImageName.parse("mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest") + ); + + @TempDir + private static Path tempFolder; + + private ApplicationContextRunner testApplicationContext; + + @BeforeAll + static void setup() throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException { + Path keyStoreFile = tempFolder.resolve("azure-cosmos-emulator.keystore"); + KeyStore keyStore = COSMOS_CONTAINER.buildNewKeyStore(); + keyStore.store(Files.newOutputStream(keyStoreFile.toFile().toPath()), + COSMOS_CONTAINER.getEmulatorKey().toCharArray()); + + System.setProperty("javax.net.ssl.trustStore", keyStoreFile.toString()); + System.setProperty("javax.net.ssl.trustStorePassword", COSMOS_CONTAINER.getEmulatorKey()); + System.setProperty("javax.net.ssl.trustStoreType", "PKCS12"); + } + + @BeforeEach + void setUp() { + testApplicationContext = new ApplicationContextRunner() + .withPropertyValues("axon.axonserver.enabled=false"); + } + + @Test + void setTokenStoreIsSetupCorrectly() { + testApplicationContext + .withUserConfiguration(DefaultContext.class) + .withPropertyValues("axon.eventhandling.tokenstore.claim-timeout=15s") + .run(context -> { + Map tokenStores = + context.getBeansOfType(TokenStore.class); + assertTrue(tokenStores.containsKey("tokenStore")); + TokenStore tokenStore = tokenStores.get("tokenStore"); + TrackingToken testToken = new GlobalSequenceTrackingToken(42); + tokenStore.initializeSegment(null, "someName", 5); + tokenStore.storeToken(testToken, "someName", 5); + assertEquals(testToken, tokenStore.fetchToken("someName", 5)); + }); + } + + @Test + void setTokenStoreClaimTimeout() { + testApplicationContext + .withUserConfiguration(DefaultContext.class) + .withPropertyValues("axon.eventhandling.tokenstore.claim-timeout=15s") + .run(context -> { + Map tokenStores = + context.getBeansOfType(TokenStore.class); + assertTrue(tokenStores.containsKey("tokenStore")); + TokenStore tokenStore = tokenStores.get("tokenStore"); + TemporalAmount tokenClaimInterval = ReflectionUtils.getFieldValue( + CosmosTokenStore.class.getDeclaredField("claimTimeout"), tokenStore + ); + assertEquals(Duration.ofSeconds(15L), tokenClaimInterval); + }); + } + + @ContextConfiguration + @EnableAutoConfiguration + @EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING) + public static class DefaultContext { + + @Bean + @Primary + public Serializer serializer() { + return JacksonSerializer.defaultSerializer(); + } + + @Bean + @Qualifier("azureCosmosAsyncClient") + public CosmosAsyncClient client() { + return new CosmosClientBuilder() + .gatewayMode() + .endpointDiscoveryEnabled(false) + .endpoint(COSMOS_CONTAINER.getEmulatorEndpoint()) + .key(COSMOS_CONTAINER.getEmulatorKey()) + .buildAsyncClient(); + } + } +} \ No newline at end of file diff --git a/axon-cosmosdb-spring-boot-autoconfigure/src/test/resources/log4j2.properties b/axon-cosmosdb-spring-boot-autoconfigure/src/test/resources/log4j2.properties new file mode 100644 index 0000000..a18fa99 --- /dev/null +++ b/axon-cosmosdb-spring-boot-autoconfigure/src/test/resources/log4j2.properties @@ -0,0 +1,55 @@ +# +# Copyright (c) 2010-2022. Axon Framework +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name=AxonTestConfiguration +appenders=console +appender.console.type=Console +appender.console.name=STDOUT +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=%d [%t] %-5p %-30.30c{1} %x - %m%n +rootLogger.level=info +rootLogger.appenderRefs=stdout +rootLogger.appenderRef.stdout.ref=STDOUT +logger.axon.name=org.axonframework +logger.axon.level=INFO +logger.axon.additivity=false +logger.axon.appenderRefs=stdout +logger.axon.appenderRef.stdout.ref=STDOUT +logger.axon-server-connection-manager.name=org.axonframework.axonserver.connector.AxonServerConnectionManager +logger.axon-server-connection-manager.level=ERROR +logger.chaining-converter.name=org.axonframework.serialization.ChainingConverter +logger.chaining-converter.level=OFF +logger.tracking-event-processor.name=org.axonframework.eventhandling.TrackingEventProcessor +logger.tracking-event-processor.level=WARN +logger.hibernate.name=org.hibernate +logger.hibernate.level=WARN +logger.hibernate-sql-exception-helper.name=org.hibernate.engine.jdbc.spi.SqlExceptionHelper +logger.hibernate-sql-exception-helper.level=ERROR +logger.hikari.name=com.zaxxer.hikari +logger.hikari.level=WARN +logger.hikari-util.name=com.zaxxer.hikari.util +logger.hikari-util.level=ERROR +logger.spring-boot-test.name=org.springframework.boot.test +logger.spring-boot-test.level=WARN +logger.spring-context-annotation.name=org.springframework.context.annotation +logger.spring-context-annotation.level=WARN +logger.spring-context-support.name=org.springframework.context.support +logger.spring-context-support.level=WARN +logger.spring-data-repo-config.name=org.springframework.data.repository.config +logger.spring-data-repo-config.level=WARN +logger.spring-orm.name=org.springframework.orm +logger.spring-orm.level=WARN +logger.spring-test.name=org.springframework.test +logger.spring-test.level=WARN diff --git a/axon-cosmosdb-spring-boot-starter/pom.xml b/axon-cosmosdb-spring-boot-starter/pom.xml new file mode 100644 index 0000000..155615a --- /dev/null +++ b/axon-cosmosdb-spring-boot-starter/pom.xml @@ -0,0 +1,50 @@ + + + + + + axon-cosmosdb-parent + org.axonframework.extensions.cosmosdb + 4.9.0-SNAPSHOT + + 4.0.0 + + axon-cosmosdb-spring-boot-starter + + Spring Boot Starter for Axon Framework Cosmos DB Extension + + Spring Boot Starter module for the Axon Framework Cosmos DB Extension through Spring Boot. + + + + + org.axonframework.extensions.cosmosdb + axon-cosmosdb-spring-boot-autoconfigure + ${project.version} + + + + + + org.axonframework.extensions.cosmosdb + axon-cosmosdb + ${project.version} + + + + \ No newline at end of file diff --git a/cosmosdb-spring-boot-3-integrationtests/pom.xml b/cosmosdb-spring-boot-3-integrationtests/pom.xml deleted file mode 100644 index 04f7af6..0000000 --- a/cosmosdb-spring-boot-3-integrationtests/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 3.2.0 - - - - axon-cosmosdb-spring-boot-3-integrationtests - org.axonframework.extensions.cosmosdb - - Axon Framework Cosmos DB Extension Spring Boot 3 Integration Tests - - Module used to test the integration with Spring Boot 3 - - 4.9.0-SNAPSHOT - - jar - \ No newline at end of file diff --git a/coverage-report/pom.xml b/coverage-report/pom.xml index 36d6035..0146fab 100644 --- a/coverage-report/pom.xml +++ b/coverage-report/pom.xml @@ -42,6 +42,12 @@ ${project.version} runtime + + org.axonframework.extensions.cosmosdb + axon-cosmosdb-spring-boot-autoconfigure + ${project.version} + runtime + org.axonframework.extensions.cosmosdb axon-cosmosdb-spring-boot-3-integrationtests diff --git a/pom.xml b/pom.xml index edde7b4..30e118f 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,8 @@ 4.9.0-SNAPSHOT axon-cosmosdb + axon-cosmosdb-spring-boot-autoconfigure + axon-cosmosdb-spring-boot-starter pom @@ -514,7 +516,7 @@ [17,) - cosmosdb-spring-boot-3-integrationtests + axon-cosmosdb-spring-boot-3-integrationtests