Skip to content

Commit

Permalink
#188 Upgraded to Spring 2.17.4 and used @autoConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Aug 12, 2023
1 parent 9541316 commit 67908d3
Show file tree
Hide file tree
Showing 24 changed files with 47 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import io.eventuate.tram.commands.common.DefaultCommandNameMapping;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;

@Configuration
@AutoConfiguration
@ConditionalOnMissingBean(CommandNameMapping.class)
public class TramCommandsCommonAutoConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import io.eventuate.tram.spring.commands.consumer.TramCommandConsumerConfiguration;
import io.eventuate.tram.spring.commands.producer.TramCommandProducerConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(TramCommandConsumerConfiguration.class)
@Import({TramCommandConsumerConfiguration.class, TramCommandProducerConfiguration.class})
public class EventuateTramCommandsAutoConfigure {
Expand Down
2 changes: 2 additions & 0 deletions eventuate-tram-spring-consumer-jdbc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

dependencies {
compile "org.springframework.boot:spring-boot-starter:$springBootVersion"

compile project(":eventuate-tram-consumer-jdbc")

compile "io.eventuate.common:eventuate-common-spring-jdbc:$eventuateCommonVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@Import(EventuateCommonJdbcOperationsConfiguration.class)
@ConditionalOnMissingBean(DuplicateMessageDetector.class)
public class TramConsumerJdbcAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import io.eventuate.tram.events.common.DomainEventNameMapping;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;

@Configuration
@AutoConfiguration
@ConditionalOnMissingBean(DomainEventNameMapping.class)
public class TramEventsCommonAutoConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.eventuate.tram.spring.events.publisher.TramEventsPublisherConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(TramEventsPublisherConfiguration.class)
@Import(TramEventsPublisherConfiguration.class)
public class TramEventsPublisherAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.eventuate.tram.spring.events.subscriber.TramEventSubscriberConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(TramEventSubscriberConfiguration.class)
@Import(TramEventSubscriberConfiguration.class)
public class TramEventsSubscriberAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import io.eventuate.tram.messaging.common.MessageInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;

@Configuration
@AutoConfiguration
public class LoggingMessageInterceptorAutoConfiguration {
@Bean
public MessageInterceptor messageLoggingInterceptor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import io.eventuate.tram.consumer.common.MessageConsumerImplementation;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(EventuateTramActiveMQMessageConsumerConfiguration.class)
@ConditionalOnMissingBean(MessageConsumerImplementation.class)
@Import(EventuateTramActiveMQMessageConsumerConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import io.eventuate.tram.spring.consumer.kafka.EventuateTramKafkaMessageConsumerConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(EventuateTramKafkaMessageConsumerConfiguration.class)
@ConditionalOnMissingBean(MessageConsumerImplementation.class)
@Import(EventuateTramKafkaMessageConsumerConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import io.eventuate.tram.consumer.rabbitmq.EventuateTramRabbitMQMessageConsumerConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(EventuateTramRabbitMQMessageConsumerConfiguration.class)
@ConditionalOnMissingBean(MessageConsumerImplementation.class)
@Import(EventuateTramRabbitMQMessageConsumerConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import io.eventuate.tram.consumer.redis.EventuateTramRedisMessageConsumerConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(EventuateTramRedisMessageConsumerConfiguration.class)
@ConditionalOnMissingBean(MessageConsumerImplementation.class)
@Import(EventuateTramRedisMessageConsumerConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.eventuate.tram.spring.messaging.producer.jdbc.TramMessageProducerJdbcConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnClass(TramMessageProducerJdbcConfiguration.class)
@Import(TramMessageProducerJdbcConfiguration.class)
public class TramMessageProducerJdbcAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import io.eventuate.tram.messaging.common.DefaultChannelMapping;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;

@Configuration
@AutoConfiguration
public class TramMessagingCommonAutoConfiguration {

@ConditionalOnMissingBean(ChannelMapping.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.eventuate.tram.spring.reactive.commands.consumer.ReactiveTramCommandConsumerConfiguration;
import io.eventuate.tram.spring.reactive.commands.producer.ReactiveTramCommandProducerConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@Import({ReactiveTramCommandConsumerConfiguration.class, ReactiveTramCommandProducerConfiguration.class})
public class EventuateReactiveTramCommandsAutoConfigure {
}
1 change: 1 addition & 0 deletions eventuate-tram-spring-reactive-consumer-jdbc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

dependencies {
compile "io.eventuate.common:eventuate-common-spring-reactive-jdbc:$eventuateCommonVersion"
compile "org.springframework.boot:spring-boot-starter:$springBootVersion"
compile project(":eventuate-tram-reactive-consumer-jdbc")
compile project(":eventuate-tram-reactive-consumer-common")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.reactive.TransactionalOperator;

import java.util.Optional;

@Configuration
@AutoConfiguration
@Import({SqlDialectConfiguration.class,
EventuateSchemaConfiguration.class})
@ConditionalOnMissingBean(ReactiveDuplicateMessageDetector.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.eventuate.tram.spring.reactive.events.autoconfigure;

import io.eventuate.tram.spring.events.publisher.ReactiveTramEventsPublisherConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@Import(ReactiveTramEventsPublisherConfiguration.class)
public class ReactiveTramEventsPublisherAutoConfiguration {
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.eventuate.tram.spring.reactive.events.autoconfigure;

import io.eventuate.tram.spring.reactive.events.subscriber.ReactiveTramEventSubscriberConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@Import(ReactiveTramEventSubscriberConfiguration.class)
public class ReactiveTramEventsSubscriberAutoConfiguration {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import io.eventuate.tram.consumer.common.MessageConsumerImplementation;
import io.eventuate.tram.spring.reactive.consumer.kafka.EventuateTramReactiveKafkaMessageConsumerConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@ConditionalOnMissingBean(MessageConsumerImplementation.class)
@Import(EventuateTramReactiveKafkaMessageConsumerConfiguration.class)
public class EventuateTramReactiveKafkaMessageConsumerAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.eventuate.tram.spring.reactive.messaging.autoconfigure;

import io.eventuate.tram.spring.messaging.producer.jdbc.reactive.ReactiveTramMessageProducerJdbcConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@Import(ReactiveTramMessageProducerJdbcConfiguration.class)
public class ReactiveTramMessageProducerJdbcAutoConfiguration {
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.eventuate.tram.spring.reactive.optimisticlocking;

import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Import;

@Configuration
@AutoConfiguration
@Import(OptimisticLockingDecoratorConfiguration.class)
public class OptimisticLockingDecoratorAutoConfiguration {
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Configuration;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = OptimisticLockingDecoratorAutoConfigurationTest.Config.class)
public class OptimisticLockingDecoratorAutoConfigurationTest extends TestCase {

@Configuration
@AutoConfiguration
@EnableAutoConfiguration(exclude= DataSourceAutoConfiguration.class)
public static class Config {
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ eventuateMavenRepoUrl=file:///Users/cer/.m2/testdeploy,https://snapshots.reposit

eventuatePluginsGradleVersion=0.13.0.BUILD-SNAPSHOT

springBootVersion=2.6.11
springBootCdcVersion=2.6.11
springBootVersion=2.7.14
springBootCdcVersion=2.7.14
micronautVersion=2.4.1
micronautDataVersion=2.3.1
eventuateUtilVersion=0.17.0.BUILD-SNAPSHOT
Expand Down

0 comments on commit 67908d3

Please sign in to comment.