diff --git a/docker-compose-mysql-binlog.yml b/docker-compose-mysql-binlog.yml index e4a9e08..7836fb5 100755 --- a/docker-compose-mysql-binlog.yml +++ b/docker-compose-mysql-binlog.yml @@ -46,7 +46,7 @@ cdcservice: SPRING_DATASOURCE_USERNAME: mysqluser SPRING_DATASOURCE_PASSWORD: mysqlpw SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver - EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092 + EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:29092 EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181 EVENTUATELOCAL_CDC_DB_USER_NAME: root EVENTUATELOCAL_CDC_DB_PASSWORD: rootpassword diff --git a/eventuate-tram-view-support-e2e-tests/src/main/java/io/eventuate/tram/viewsupport/e2e/tests/EventuateTramViewSupportE2ETestConfiguration.java b/eventuate-tram-view-support-e2e-tests/src/main/java/io/eventuate/tram/viewsupport/e2e/tests/EventuateTramViewSupportE2ETestConfiguration.java index 7fa5a8d..5d6cdd7 100644 --- a/eventuate-tram-view-support-e2e-tests/src/main/java/io/eventuate/tram/viewsupport/e2e/tests/EventuateTramViewSupportE2ETestConfiguration.java +++ b/eventuate-tram-view-support-e2e-tests/src/main/java/io/eventuate/tram/viewsupport/e2e/tests/EventuateTramViewSupportE2ETestConfiguration.java @@ -1,14 +1,13 @@ package io.eventuate.tram.viewsupport.e2e.tests; -import io.eventuate.messaging.kafka.basic.consumer.EventuateKafkaConsumerConfigurationProperties; -import io.eventuate.tram.consumer.kafka.EventuateTramKafkaMessageConsumerConfiguration; +import io.eventuate.messaging.kafka.spring.basic.consumer.EventuateKafkaConsumerSpringConfigurationPropertiesConfiguration; +import io.eventuate.tram.spring.consumer.kafka.EventuateTramKafkaMessageConsumerConfiguration; import io.eventuate.tram.events.common.DomainEvent; import io.eventuate.tram.events.common.DomainEventNameMapping; import io.eventuate.tram.events.subscriber.DomainEventDispatcher; import io.eventuate.tram.messaging.consumer.MessageConsumer; import io.eventuate.tram.viewsupport.rebuild.*; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @@ -21,8 +20,9 @@ @ComponentScan @EnableJpaRepositories @EnableMongoRepositories -@Import({SnapshotConfiguration.class, EventuateTramKafkaMessageConsumerConfiguration.class}) -@EnableConfigurationProperties(EventuateKafkaConsumerConfigurationProperties.class) +@Import({SnapshotConfiguration.class, + EventuateTramKafkaMessageConsumerConfiguration.class, + EventuateKafkaConsumerSpringConfigurationPropertiesConfiguration.class}) public class EventuateTramViewSupportE2ETestConfiguration { @Bean public TestDomainEntityViewEventConsumer testDomainEntityViewEventConsumer() { diff --git a/eventuate-tram-view-support-rebuild/build.gradle b/eventuate-tram-view-support-rebuild/build.gradle index 141b51a..7b20518 100644 --- a/eventuate-tram-view-support-rebuild/build.gradle +++ b/eventuate-tram-view-support-rebuild/build.gradle @@ -1,7 +1,7 @@ dependencies { - compile "io.eventuate.messaging.kafka:eventuate-messaging-kafka-producer:$eventuateMessagingKafkaVersion" - compile "io.eventuate.tram.core:eventuate-tram-jdbc-kafka:$eventuateTramVersion" - compile "io.eventuate.tram.core:eventuate-tram-events:$eventuateTramVersion" + compile "io.eventuate.messaging.kafka:eventuate-messaging-kafka-spring-producer:$eventuateMessagingKafkaVersion" + compile "io.eventuate.tram.core:eventuate-tram-spring-jdbc-kafka:$eventuateTramVersion" + compile "io.eventuate.tram.core:eventuate-tram-spring-events:$eventuateTramVersion" compile "commons-lang:commons-lang:2.6" compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion" compile "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion" diff --git a/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/DomainSnapshotExportService.java b/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/DomainSnapshotExportService.java index 2e00a49..b73a9e0 100644 --- a/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/DomainSnapshotExportService.java +++ b/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/DomainSnapshotExportService.java @@ -108,7 +108,7 @@ private CdcProcessingStatus getCdcProcessingStatus(String readerName) { void iterateOverAllDomainEntities(Consumer callback) { for (int i = 0; ; i++) { - Page page = domainRepository.findAll(new PageRequest(i, iterationPageSize)); + Page page = domainRepository.findAll(PageRequest.of(i, iterationPageSize)); page.forEach(callback); if (page.isLast()) { break; diff --git a/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/SnapshotConfiguration.java b/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/SnapshotConfiguration.java index c21ee1b..2ad2ab6 100644 --- a/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/SnapshotConfiguration.java +++ b/eventuate-tram-view-support-rebuild/src/main/java/io/eventuate/tram/viewsupport/rebuild/SnapshotConfiguration.java @@ -1,10 +1,13 @@ package io.eventuate.tram.viewsupport.rebuild; import io.eventuate.common.id.IdGenerator; +import io.eventuate.common.spring.jdbc.EventuateCommonJdbcOperationsConfiguration; import io.eventuate.messaging.kafka.producer.EventuateKafkaProducer; import io.eventuate.messaging.kafka.producer.EventuateKafkaProducerConfigurationProperties; -import io.eventuate.tram.events.publisher.TramEventsPublisherConfiguration; -import io.eventuate.tram.messaging.producer.jdbc.TramMessageProducerJdbcConfiguration; +import io.eventuate.messaging.kafka.spring.producer.EventuateKafkaProducerSpringConfigurationProperties; +import io.eventuate.messaging.kafka.spring.producer.EventuateKafkaProducerSpringConfigurationPropertiesConfiguration; +import io.eventuate.tram.spring.events.publisher.TramEventsPublisherConfiguration; +import io.eventuate.tram.spring.messaging.producer.jdbc.TramMessageProducerJdbcConfiguration; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -14,8 +17,10 @@ import javax.sql.DataSource; @Import({TramEventsPublisherConfiguration.class, - TramMessageProducerJdbcConfiguration.class}) -@EnableConfigurationProperties({EventuateKafkaProducerConfigurationProperties.class}) + TramMessageProducerJdbcConfiguration.class, + EventuateKafkaProducerSpringConfigurationPropertiesConfiguration.class, + EventuateCommonJdbcOperationsConfiguration.class}) +@EnableConfigurationProperties({EventuateKafkaProducerSpringConfigurationProperties.class}) public class SnapshotConfiguration { @Bean diff --git a/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/IterationOverDomainEntitiesTest.java b/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/IterationOverDomainEntitiesTest.java index 069f544..b2756f6 100644 --- a/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/IterationOverDomainEntitiesTest.java +++ b/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/IterationOverDomainEntitiesTest.java @@ -1,5 +1,6 @@ package io.eventuate.tram.viewsupport.rebuild; +import io.eventuate.common.spring.jdbc.EventuateCommonJdbcOperationsConfiguration; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -9,6 +10,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -21,6 +23,7 @@ public class IterationOverDomainEntitiesTest { @Configuration @EnableJpaRepositories @EnableAutoConfiguration + @Import(EventuateCommonJdbcOperationsConfiguration.class) public static class Config { @Bean public SnapshotterConfigurationProperties snapshotterConfigurationProperties() { diff --git a/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/TableLockingTest.java b/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/TableLockingTest.java index 3046c02..9ff4d09 100644 --- a/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/TableLockingTest.java +++ b/eventuate-tram-view-support-rebuild/src/test/java/io/eventuate/tram/viewsupport/rebuild/TableLockingTest.java @@ -1,5 +1,6 @@ package io.eventuate.tram.viewsupport.rebuild; +import io.eventuate.common.spring.jdbc.EventuateCommonJdbcOperationsConfiguration; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -7,6 +8,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -21,6 +23,7 @@ public class TableLockingTest { @Configuration @EnableJpaRepositories @EnableAutoConfiguration + @Import(EventuateCommonJdbcOperationsConfiguration.class) public static class Config { @Bean public DBDialectDeterminer dbDialectDeterminer() { diff --git a/gradle.properties b/gradle.properties index e981845..753b8a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,8 +5,8 @@ deployUrl=file:///Users/cer/.m2/testdeploy eventuateMavenRepoUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-release/,file:///Users/cer/.m2/testdeploy,https://dl.bintray.com/eventuateio-oss/eventuate-maven-rc springBootVersion=2.1.1.RELEASE -eventuateClientVersion=0.22.0.RC2 -eventuateTramVersion=0.22.0.RC8 +eventuateClientVersion=0.23.0.RELEASE +eventuateTramVersion=0.24.0.RELEASE eventuateUtilVersion=0.3.0.RELEASE -eventuateMessagingKafkaVersion=0.8.0.RELEASE +eventuateMessagingKafkaVersion=0.9.0.RELEASE version=0.1.0-SNAPSHOT \ No newline at end of file