diff --git a/geode-spring-boot-autoconfigure/geode-spring-boot-autoconfigure.gradle b/geode-spring-boot-autoconfigure/geode-spring-boot-autoconfigure.gradle new file mode 100644 index 00000000..3994da04 --- /dev/null +++ b/geode-spring-boot-autoconfigure/geode-spring-boot-autoconfigure.gradle @@ -0,0 +1,39 @@ +apply plugin: 'io.spring.convention.spring-module' +apply from: IDE_GRADLE + +description = "Spring Boot for Apache Geode Auto-Configuration" + +repositories { + maven { url "https://repo.spring.io/libs-snapshot" } +} + +dependencies { + + compile "org.springframework:spring-context-support" + compile "org.springframework:spring-jcl" + compile "org.springframework.data:spring-data-geode:$springDataGeodeVersion" + + compile("org.springframework.boot:spring-boot-starter") { + exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"; + } + + compile project(":geode-spring-boot") + + testCompile "org.assertj:assertj-core" + testCompile "junit:junit" + testCompile "org.mockito:mockito-core" + testCompile "org.projectlombok:lombok" + testCompile "edu.umd.cs.mtc:multithreadedtc" + + testCompile("org.springframework.boot:spring-boot-starter-test") { + exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"; + } + + testCompile slf4jDependencies + testCompile "org.springframework.data:spring-test-data-geode" + + testRuntime "javax.cache:cache-api" + +// integrationTestRuntime "org.springframework.shell:spring-shell" + +} diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/CachingProviderAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/CachingProviderAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/CachingProviderAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/CachingProviderAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/ClientCacheAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/ClientCacheAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/ClientCacheAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/ClientCacheAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/ClientSecurityAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/ClientSecurityAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/ClientSecurityAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/ClientSecurityAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/ContinuousQueryAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/ContinuousQueryAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/ContinuousQueryAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/ContinuousQueryAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/FunctionExecutionAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/FunctionExecutionAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/FunctionExecutionAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/FunctionExecutionAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/GemFireRepositoriesAutoConfigurationRegistrar.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/GemFireRepositoriesAutoConfigurationRegistrar.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/GemFireRepositoriesAutoConfigurationRegistrar.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/GemFireRepositoriesAutoConfigurationRegistrar.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/PeerSecurityAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/PeerSecurityAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/PeerSecurityAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/PeerSecurityAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/RepositoriesAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/RepositoriesAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/RepositoriesAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/RepositoriesAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/SslAutoConfiguration.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SslAutoConfiguration.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/SslAutoConfiguration.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/SslAutoConfiguration.java diff --git a/geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java b/geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java similarity index 100% rename from geode-spring-boot/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java rename to geode-spring-boot-autoconfigure/src/main/java/org/springframework/geode/boot/autoconfigure/package-info.java diff --git a/geode-spring-boot/src/main/resources/META-INF/spring.factories b/geode-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories similarity index 100% rename from geode-spring-boot/src/main/resources/META-INF/spring.factories rename to geode-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories diff --git a/geode-spring-boot/src/test/java/example/app/NonBeanType.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/NonBeanType.java similarity index 100% rename from geode-spring-boot/src/test/java/example/app/NonBeanType.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/NonBeanType.java diff --git a/geode-spring-boot/src/test/java/example/app/model/Author.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/model/Author.java similarity index 85% rename from geode-spring-boot/src/test/java/example/app/model/Author.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/model/Author.java index 1f739a73..4cbc4255 100644 --- a/geode-spring-boot/src/test/java/example/app/model/Author.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/app/model/Author.java @@ -24,9 +24,12 @@ import lombok.NonNull; import lombok.RequiredArgsConstructor; /** - * The Author class... + * The {@link Author} class is an Abstract Data Type (ADT) modeling a book author. * * @author John Blum + * @see lombok + * @see org.springframework.data.annotation.Id + * @see org.springframework.data.gemfire.mapping.annotation.Region * @since 1.0.0 */ @Data diff --git a/geode-spring-boot/src/test/java/example/app/model/Book.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/model/Book.java similarity index 95% rename from geode-spring-boot/src/test/java/example/app/model/Book.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/model/Book.java index ceb40921..969334d6 100644 --- a/geode-spring-boot/src/test/java/example/app/model/Book.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/app/model/Book.java @@ -32,6 +32,8 @@ import lombok.RequiredArgsConstructor; * @see lombok * @see org.springframework.data.annotation.Id * @see org.springframework.data.gemfire.mapping.annotation.Region + * @see example.app.model.Author + * @see example.app.model.ISBN * @since 1.0.0 */ @Region("Books") diff --git a/geode-spring-boot/src/test/java/example/app/model/ISBN.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/model/ISBN.java similarity index 100% rename from geode-spring-boot/src/test/java/example/app/model/ISBN.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/model/ISBN.java diff --git a/geode-spring-boot/src/test/java/example/app/repo/BookRepository.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/repo/BookRepository.java similarity index 100% rename from geode-spring-boot/src/test/java/example/app/repo/BookRepository.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/repo/BookRepository.java diff --git a/geode-spring-boot/src/test/java/example/app/service/BookService.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/service/BookService.java similarity index 100% rename from geode-spring-boot/src/test/java/example/app/service/BookService.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/service/BookService.java diff --git a/geode-spring-boot/src/test/java/example/app/service/support/CachingBookService.java b/geode-spring-boot-autoconfigure/src/test/java/example/app/service/support/CachingBookService.java similarity index 96% rename from geode-spring-boot/src/test/java/example/app/service/support/CachingBookService.java rename to geode-spring-boot-autoconfigure/src/test/java/example/app/service/support/CachingBookService.java index 35546c48..f6b6531f 100644 --- a/geode-spring-boot/src/test/java/example/app/service/support/CachingBookService.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/app/service/support/CachingBookService.java @@ -33,6 +33,8 @@ import example.app.service.BookService; * * @author John Blum * @see example.app.model.Book + * @see example.app.model.ISBN + * @see example.app.repo.BookRepository * @see example.app.service.BookService * @see org.springframework.cache.annotation.Cacheable * @see org.springframework.stereotype.Service diff --git a/geode-spring-boot/src/test/java/example/echo/config/EchoClientConfiguration.java b/geode-spring-boot-autoconfigure/src/test/java/example/echo/config/EchoClientConfiguration.java similarity index 100% rename from geode-spring-boot/src/test/java/example/echo/config/EchoClientConfiguration.java rename to geode-spring-boot-autoconfigure/src/test/java/example/echo/config/EchoClientConfiguration.java diff --git a/geode-spring-boot/src/test/java/example/echo/config/EchoServerConfiguration.java b/geode-spring-boot-autoconfigure/src/test/java/example/echo/config/EchoServerConfiguration.java similarity index 100% rename from geode-spring-boot/src/test/java/example/echo/config/EchoServerConfiguration.java rename to geode-spring-boot-autoconfigure/src/test/java/example/echo/config/EchoServerConfiguration.java diff --git a/geode-spring-boot/src/test/java/example/geode/cache/EchoCacheLoader.java b/geode-spring-boot-autoconfigure/src/test/java/example/geode/cache/EchoCacheLoader.java similarity index 96% rename from geode-spring-boot/src/test/java/example/geode/cache/EchoCacheLoader.java rename to geode-spring-boot-autoconfigure/src/test/java/example/geode/cache/EchoCacheLoader.java index ba984fa4..5373d6a1 100644 --- a/geode-spring-boot/src/test/java/example/geode/cache/EchoCacheLoader.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/geode/cache/EchoCacheLoader.java @@ -25,6 +25,7 @@ import org.springframework.geode.cache.support.CacheLoaderSupport; * The {@link EchoCacheLoader} class is an implementation of {@link CacheLoader} that echos the key as the value. * * @author John Blum + * @see org.apache.geode.cache.CacheLoader * @see org.springframework.geode.cache.support.CacheLoaderSupport * @since 1.0.0 */ diff --git a/geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureReading.java b/geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReading.java similarity index 97% rename from geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureReading.java rename to geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReading.java index 19649d9b..752f4f9e 100644 --- a/geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureReading.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReading.java @@ -28,6 +28,8 @@ import lombok.RequiredArgsConstructor; * tracking the recorded temperature, unit and timestamp of the event. * * @author John Blum + * @see java.time.LocalDateTime + * @see lombok * @see example.geode.query.cq.event.TemperatureUnit * @since 1.0.0 */ diff --git a/geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java b/geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java similarity index 91% rename from geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java rename to geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java index e04a7b1a..c1a56051 100644 --- a/geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureReadingsContinuousQueriesHandler.java @@ -26,9 +26,12 @@ import org.apache.geode.cache.query.CqEvent; import org.springframework.data.gemfire.listener.annotation.ContinuousQuery; /** - * The TemperatureReadingsContinuousQueriesHandler class... + * The {@link TemperatureReadingsContinuousQueriesHandler} class is a POJO containing Apache Geode/Pivotal GemFire + * Continuous Query (CQ) definitions. * * @author John Blum + * @see org.apache.geode.cache.query.CqEvent + * @see org.springframework.data.gemfire.listener.annotation.ContinuousQuery * @since 1.0.0 */ @SuppressWarnings("unused") diff --git a/geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureUnit.java b/geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureUnit.java similarity index 100% rename from geode-spring-boot/src/test/java/example/geode/query/cq/event/TemperatureUnit.java rename to geode-spring-boot-autoconfigure/src/test/java/example/geode/query/cq/event/TemperatureUnit.java diff --git a/geode-spring-boot/src/test/java/example/java/net/UrlRevealed.java b/geode-spring-boot-autoconfigure/src/test/java/example/java/net/UrlRevealed.java similarity index 94% rename from geode-spring-boot/src/test/java/example/java/net/UrlRevealed.java rename to geode-spring-boot-autoconfigure/src/test/java/example/java/net/UrlRevealed.java index 6b4a86fb..5d8bcb1c 100644 --- a/geode-spring-boot/src/test/java/example/java/net/UrlRevealed.java +++ b/geode-spring-boot-autoconfigure/src/test/java/example/java/net/UrlRevealed.java @@ -21,7 +21,7 @@ import java.net.URL; import org.springframework.core.io.ClassPathResource; /** - * The {@link UrlRevealed} class... + * The {@link UrlRevealed} class is a disclosure of Java's {@link URL} class. * * @author John Blum * @see java.net.URL diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cache/client/SpringBootApacheGeodeClientCacheApplicationIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cache/peer/SpringBootApacheGeodePeerCacheApplicationIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java similarity index 75% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java index 95c4308c..982d8d44 100644 --- a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java +++ b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/caching/AutoConfiguredCachingIntegrationTests.java @@ -22,6 +22,7 @@ import javax.annotation.Resource; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientRegionShortcut; +import org.assertj.core.api.Assertions; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; @@ -70,53 +71,53 @@ public class AutoConfiguredCachingIntegrationTests extends IntegrationTestsSuppo private void assertBook(Book book, String title) { - assertThat(book).isNotNull(); - assertThat(book.isNew()).isFalse(); - assertThat(book.getTitle()).isEqualTo(title); + Assertions.assertThat(book).isNotNull(); + Assertions.assertThat(book.isNew()).isFalse(); + Assertions.assertThat(book.getTitle()).isEqualTo(title); } @Test public void bookServiceWasConfiguredCorrectly() { - assertThat(this.bookService).isNotNull(); - assertThat(this.bookService.isCacheMiss()).isFalse(); + Assertions.assertThat(this.bookService).isNotNull(); + Assertions.assertThat(this.bookService.isCacheMiss()).isFalse(); } @Test public void cachedBooksRegionWasConfiguredCorrectly() { - assertThat(this.cachedBooks).isNotNull(); + Assertions.assertThat(this.cachedBooks).isNotNull(); assertThat(this.cachedBooks.getName()).isEqualTo("CachedBooks"); assertThat(this.cachedBooks.getFullPath()).isEqualTo(RegionUtils.toRegionPath("CachedBooks")); - assertThat(this.cachedBooks).isEmpty(); + Assertions.assertThat(this.cachedBooks).isEmpty(); } @Test public void geodeAsTheCachingProviderWasAutoConfiguredCorrectly() { - assertThat(this.cachedBooks).isEmpty(); + Assertions.assertThat(this.cachedBooks).isEmpty(); Book bookOne = this.bookService.findByTitle("Star Wars 3 - Revenge of the Sith"); assertBook(bookOne, "Star Wars 3 - Revenge of the Sith"); - assertThat(this.bookService.isCacheMiss()).isTrue(); - assertThat(this.cachedBooks).hasSize(1); - assertThat(this.cachedBooks.get(bookOne.getTitle())).isEqualTo(bookOne); + Assertions.assertThat(this.bookService.isCacheMiss()).isTrue(); + Assertions.assertThat(this.cachedBooks).hasSize(1); + Assertions.assertThat(this.cachedBooks.get(bookOne.getTitle())).isEqualTo(bookOne); Book bookOneAgain = this.bookService.findByTitle(bookOne.getTitle()); - assertThat(bookOneAgain).isEqualTo(bookOne); - assertThat(this.bookService.isCacheMiss()).isFalse(); - assertThat(this.cachedBooks).hasSize(1); - assertThat(this.cachedBooks.get(bookOne.getTitle())).isEqualTo(bookOne); + Assertions.assertThat(bookOneAgain).isEqualTo(bookOne); + Assertions.assertThat(this.bookService.isCacheMiss()).isFalse(); + Assertions.assertThat(this.cachedBooks).hasSize(1); + Assertions.assertThat(this.cachedBooks.get(bookOne.getTitle())).isEqualTo(bookOne); Book bookTwo = this.bookService.findByTitle("Star Wars 6 - Return of the Jedi"); assertBook(bookTwo, "Star Wars 6 - Return of the Jedi"); - assertThat(this.bookService.isCacheMiss()).isTrue(); - assertThat(this.cachedBooks).hasSize(2); - assertThat(this.cachedBooks.get(bookOne.getTitle())).isEqualTo(bookOne); - assertThat(this.cachedBooks.get(bookTwo.getTitle())).isEqualTo(bookTwo); + Assertions.assertThat(this.bookService.isCacheMiss()).isTrue(); + Assertions.assertThat(this.cachedBooks).hasSize(2); + Assertions.assertThat(this.cachedBooks.get(bookOne.getTitle())).isEqualTo(bookOne); + Assertions.assertThat(this.cachedBooks.get(bookTwo.getTitle())).isEqualTo(bookTwo); } @SpringBootApplication(scanBasePackageClasses = NonBeanType.class) diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java similarity index 94% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java index 0cd3b93d..ac16f6f0 100644 --- a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java +++ b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/cq/AutoConfiguredContinuousQueryIntegrationTests.java @@ -28,6 +28,7 @@ import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.LoaderHelper; import org.apache.geode.cache.Region; import org.apache.geode.cache.client.ClientRegionShortcut; +import org.assertj.core.api.Assertions; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -97,7 +98,7 @@ public class AutoConfiguredContinuousQueryIntegrationTests extends ForkingClient @Before public void setup() { - assertThat(this.temperatureReadingsTemplate.get(1L)) + Assertions.assertThat(this.temperatureReadingsTemplate.get(1L)) .isEqualTo(TemperatureReading.of(99)); assertThat(this.temperatureReadings.sizeOnServer()).isEqualTo(8); @@ -106,9 +107,9 @@ public class AutoConfiguredContinuousQueryIntegrationTests extends ForkingClient @Test public void assertTemperatureReadingsAreCorrect() { - assertThat(this.temperatureReadingsHandler.getTemperatureReadingCount()).isEqualTo(4); - assertThat(this.temperatureReadingsHandler.getBoilingTemperatures()).contains(300, 242); - assertThat(this.temperatureReadingsHandler.getFreezingTemperatures()).contains(16, -51); + Assertions.assertThat(this.temperatureReadingsHandler.getTemperatureReadingCount()).isEqualTo(4); + Assertions.assertThat(this.temperatureReadingsHandler.getBoilingTemperatures()).contains(300, 242); + Assertions.assertThat(this.temperatureReadingsHandler.getFreezingTemperatures()).contains(16, -51); } @SpringBootApplication diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/AutoConfiguredFunctionExecutionsIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/function/executions/Calculator.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/AutoConfiguredRepositoriesIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/model/Customer.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/model/Customer.java similarity index 98% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/model/Customer.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/model/Customer.java index 316c9445..02f314a5 100644 --- a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/model/Customer.java +++ b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/model/Customer.java @@ -27,6 +27,7 @@ import lombok.RequiredArgsConstructor; * {@link Customer} class and Abstract Data Type (ADT) modeling a customer. * * @author John Blum + * @see lombok * @see org.springframework.data.annotation.Id * @see org.springframework.data.gemfire.mapping.annotation.Region * @since 1.0.0 diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/repo/CustomerRepository.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/service/CustomerService.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/service/CustomerService.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/repository/service/CustomerService.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/repository/service/CustomerService.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/AbstractAutoConfiguredSecurityContextIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/AbstractAutoConfiguredSecurityContextIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/AbstractAutoConfiguredSecurityContextIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/AbstractAutoConfiguredSecurityContextIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/cloud/AutoConfiguredCloudSecurityContextIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/auth/local/AutoConfiguredLocalSecurityContextIntegrationTests.java diff --git a/geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java b/geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java similarity index 100% rename from geode-spring-boot/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java rename to geode-spring-boot-autoconfigure/src/test/java/org/springframework/geode/boot/autoconfigure/security/ssl/AutoConfiguredSslIntegrationTests.java diff --git a/geode-spring-boot/src/test/resources/application-security-cloud.properties b/geode-spring-boot-autoconfigure/src/test/resources/application-security-cloud.properties similarity index 100% rename from geode-spring-boot/src/test/resources/application-security-cloud.properties rename to geode-spring-boot-autoconfigure/src/test/resources/application-security-cloud.properties diff --git a/geode-spring-boot/src/test/resources/application-security-local-client.properties b/geode-spring-boot-autoconfigure/src/test/resources/application-security-local-client.properties similarity index 100% rename from geode-spring-boot/src/test/resources/application-security-local-client.properties rename to geode-spring-boot-autoconfigure/src/test/resources/application-security-local-client.properties diff --git a/geode-spring-boot/src/test/resources/application-security-local-server.properties b/geode-spring-boot-autoconfigure/src/test/resources/application-security-local-server.properties similarity index 100% rename from geode-spring-boot/src/test/resources/application-security-local-server.properties rename to geode-spring-boot-autoconfigure/src/test/resources/application-security-local-server.properties diff --git a/geode-spring-boot/src/test/resources/application-ssl.properties b/geode-spring-boot-autoconfigure/src/test/resources/application-ssl.properties similarity index 100% rename from geode-spring-boot/src/test/resources/application-ssl.properties rename to geode-spring-boot-autoconfigure/src/test/resources/application-ssl.properties diff --git a/geode-spring-boot/src/test/resources/application-vcap.properties b/geode-spring-boot-autoconfigure/src/test/resources/application-vcap.properties similarity index 100% rename from geode-spring-boot/src/test/resources/application-vcap.properties rename to geode-spring-boot-autoconfigure/src/test/resources/application-vcap.properties diff --git a/geode-spring-boot/src/test/resources/test-trusted.keystore b/geode-spring-boot-autoconfigure/src/test/resources/test-trusted.keystore similarity index 100% rename from geode-spring-boot/src/test/resources/test-trusted.keystore rename to geode-spring-boot-autoconfigure/src/test/resources/test-trusted.keystore diff --git a/geode-spring-boot/geode-spring-boot.gradle b/geode-spring-boot/geode-spring-boot.gradle index 49e64b23..9224c081 100644 --- a/geode-spring-boot/geode-spring-boot.gradle +++ b/geode-spring-boot/geode-spring-boot.gradle @@ -1,5 +1,4 @@ apply plugin: 'io.spring.convention.spring-module' - apply from: IDE_GRADLE description = "Spring Boot for Apache Geode" @@ -31,8 +30,6 @@ dependencies { testCompile slf4jDependencies testCompile "org.springframework.data:spring-test-data-geode" - testRuntime "javax.cache:cache-api" - // integrationTestRuntime "org.springframework.shell:spring-shell" } diff --git a/geode-spring-boot/src/test/java/org/springframework/data/gemfire/support/GemfireBeanFactoryLocatorProxy.java b/geode-spring-boot/src/main/java/org/springframework/data/gemfire/support/GemfireBeanFactoryLocatorProxy.java similarity index 89% rename from geode-spring-boot/src/test/java/org/springframework/data/gemfire/support/GemfireBeanFactoryLocatorProxy.java rename to geode-spring-boot/src/main/java/org/springframework/data/gemfire/support/GemfireBeanFactoryLocatorProxy.java index 65ab535a..bf951e0a 100644 --- a/geode-spring-boot/src/test/java/org/springframework/data/gemfire/support/GemfireBeanFactoryLocatorProxy.java +++ b/geode-spring-boot/src/main/java/org/springframework/data/gemfire/support/GemfireBeanFactoryLocatorProxy.java @@ -28,9 +28,12 @@ import org.springframework.beans.factory.BeanFactory; * @see org.springframework.data.gemfire.support.GemfireBeanFactoryLocator * @since 1.0.0 */ -// TODO: remove this class once and refactor the SDG GemfireBeanFactoryLocator! +// TODO: remove this class and refactor the SDG GemfireBeanFactoryLocator! public class GemfireBeanFactoryLocatorProxy extends GemfireBeanFactoryLocator { + /** + * Clear all {@link BeanFactory} references stored during application runtime. + */ public static void clear() { BEAN_FACTORIES.clear(); }