Move the Books application into example.app.books.
Move the LibraryService into example.app.library.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package example.app;
|
||||
package example.app.books;
|
||||
|
||||
/**
|
||||
* The {@link NonBeanType} class is a non-Spring bean, placeholder reference type for classpath component scanning.
|
||||
@@ -13,7 +13,7 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package example.app.model;
|
||||
package example.app.books.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
@@ -13,7 +13,7 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package example.app.model;
|
||||
package example.app.books.model;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@@ -32,8 +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
|
||||
* @see example.app.books.model.Author
|
||||
* @see example.app.books.model.ISBN
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@@ -13,7 +13,7 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package example.app.model;
|
||||
package example.app.books.model;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -14,23 +14,23 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package example.app.repo;
|
||||
package example.app.books.repo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
import example.app.model.Author;
|
||||
import example.app.model.Book;
|
||||
import example.app.model.ISBN;
|
||||
import example.app.books.model.Author;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.books.model.ISBN;
|
||||
|
||||
/**
|
||||
* The {@link BookRepository} interface is a Spring Data {@link CrudRepository} defining basic CRUD
|
||||
* and simple query data access operations on {@link Book} objects to the backing data store.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see example.app.model.Book
|
||||
* @see example.app.model.ISBN
|
||||
* @see example.app.books.model.Book
|
||||
* @see example.app.books.model.ISBN
|
||||
* @see org.springframework.data.repository.CrudRepository
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@@ -13,7 +13,7 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
package example.app.service;
|
||||
package example.app.books.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,19 +21,19 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import example.app.model.Author;
|
||||
import example.app.model.Book;
|
||||
import example.app.model.ISBN;
|
||||
import example.app.repo.BookRepository;
|
||||
import example.app.books.model.Author;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.books.model.ISBN;
|
||||
import example.app.books.repo.BookRepository;
|
||||
|
||||
/**
|
||||
* The {@link BookService} class is an application {@link Service service} class for managing {@link Book Books}.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see example.app.model.Author
|
||||
* @see example.app.model.Book
|
||||
* @see example.app.model.ISBN
|
||||
* @see example.app.repo.BookRepository
|
||||
* @see example.app.books.model.Author
|
||||
* @see example.app.books.model.Book
|
||||
* @see example.app.books.model.ISBN
|
||||
* @see example.app.books.repo.BookRepository
|
||||
* @see org.springframework.stereotype.Service
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@@ -14,7 +14,7 @@
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package example.app.service.support;
|
||||
package example.app.books.service.support;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@@ -22,20 +22,20 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import example.app.model.Book;
|
||||
import example.app.model.ISBN;
|
||||
import example.app.repo.BookRepository;
|
||||
import example.app.service.BookService;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.books.model.ISBN;
|
||||
import example.app.books.repo.BookRepository;
|
||||
import example.app.books.service.BookService;
|
||||
|
||||
/**
|
||||
* The {@link CachingBookService} class is an implementation and extension of {@link BookService}
|
||||
* with caching capabilities.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see example.app.model.Book
|
||||
* @see example.app.model.ISBN
|
||||
* @see example.app.repo.BookRepository
|
||||
* @see example.app.service.BookService
|
||||
* @see example.app.books.model.Book
|
||||
* @see example.app.books.model.ISBN
|
||||
* @see example.app.books.repo.BookRepository
|
||||
* @see example.app.books.service.BookService
|
||||
* @see org.springframework.cache.annotation.Cacheable
|
||||
* @see org.springframework.stereotype.Service
|
||||
* @since 1.0.0
|
||||
@@ -13,8 +13,7 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package example.library.service;
|
||||
package example.app.library.service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -22,13 +21,17 @@ import java.util.List;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import example.app.model.Author;
|
||||
import example.app.model.Book;
|
||||
import example.app.books.model.Author;
|
||||
import example.app.books.model.Book;
|
||||
|
||||
/**
|
||||
* The LibraryService class...
|
||||
* The {@link LibraryService} class models a Library.
|
||||
*
|
||||
* @author John Blum
|
||||
* @see org.springframework.cache.annotation.Cacheable
|
||||
* @see org.springframework.stereotype.Service
|
||||
* @see example.app.books.model.Author
|
||||
* @see example.app.books.model.Book
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Service
|
||||
@@ -13,20 +13,20 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.geode.boot.autoconfigure.caching;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
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;
|
||||
import org.junit.runners.MethodSorters;
|
||||
|
||||
import org.apache.geode.cache.Region;
|
||||
import org.apache.geode.cache.client.ClientRegionShortcut;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -37,9 +37,11 @@ import org.springframework.data.gemfire.util.RegionUtils;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import example.app.NonBeanType;
|
||||
import example.app.model.Book;
|
||||
import example.app.service.support.CachingBookService;
|
||||
import org.assertj.core.api.Assertions;
|
||||
|
||||
import example.app.books.NonBeanType;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.books.service.support.CachingBookService;
|
||||
|
||||
/**
|
||||
* Integration tests testing the auto-configuration of Spring's Cache Abstraction with Apache Geode
|
||||
|
||||
@@ -53,8 +53,8 @@ import org.springframework.data.gemfire.tests.integration.ForkingClientServerInt
|
||||
import org.springframework.geode.security.TestSecurityManager;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import example.app.model.Book;
|
||||
import example.app.model.ISBN;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.books.model.ISBN;
|
||||
|
||||
/**
|
||||
* Integration tests testing the SDG {@link EnableClusterConfiguration} annotation functionality
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.geode.boot.autoconfigure.configuration;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.apache.geode.cache.RegionShortcut;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.apache.geode.cache.RegionShortcut;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@@ -219,7 +220,7 @@ public class GemFirePropertiesIntegrationTests extends IntegrationTestsSupport {
|
||||
EntityProperties entityProperties = this.gemfireProperties.getEntities();
|
||||
|
||||
assertThat(entityProperties).isNotNull();
|
||||
assertThat(entityProperties.getBasePackages()).isEqualTo("example.app.model");
|
||||
assertThat(entityProperties.getBasePackages()).isEqualTo("example.app.books.model");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -41,10 +41,10 @@ import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfigura
|
||||
import org.springframework.geode.boot.autoconfigure.RegionTemplateAutoConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import example.app.NonBeanType;
|
||||
import example.app.model.Author;
|
||||
import example.app.model.Book;
|
||||
import example.library.service.LibraryService;
|
||||
import example.app.books.NonBeanType;
|
||||
import example.app.books.model.Author;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.library.service.LibraryService;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link RegionTemplateAutoConfiguration} using SDG's {@link EnableCachingDefinedRegions}
|
||||
|
||||
@@ -35,9 +35,9 @@ import org.springframework.geode.boot.autoconfigure.ContinuousQueryAutoConfigura
|
||||
import org.springframework.geode.boot.autoconfigure.RegionTemplateAutoConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import example.app.model.Author;
|
||||
import example.app.model.Book;
|
||||
import example.app.model.ISBN;
|
||||
import example.app.books.model.Author;
|
||||
import example.app.books.model.Book;
|
||||
import example.app.books.model.ISBN;
|
||||
|
||||
/**
|
||||
* Integration tests for {@link RegionTemplateAutoConfiguration} using SDG's {@link EnableEntityDefinedRegions}
|
||||
|
||||
@@ -53,7 +53,7 @@ spring.data.gemfire.disk.store.max-oplog-size=4096
|
||||
spring.data.gemfire.disk.store.queue-size=1000
|
||||
spring.data.gemfire.disk.store.time-interval=2000
|
||||
spring.data.gemfire.disk.store.write-buffer-size=65535
|
||||
spring.data.gemfire.entities.base-packages=example.app.model
|
||||
spring.data.gemfire.entities.base-packages=example.app.books.model
|
||||
spring.data.gemfire.locator.host=mailbox
|
||||
spring.data.gemfire.locator.port=20668
|
||||
spring.data.gemfire.logging.level=CONFIG
|
||||
|
||||
@@ -22,7 +22,7 @@ annotation:
|
||||
.`Customer` entity class
|
||||
[source,java]
|
||||
----
|
||||
package example.app.model;
|
||||
package example.app.books.model;
|
||||
|
||||
import ...;
|
||||
@Region("Customers")
|
||||
@@ -42,7 +42,7 @@ Declare your _Repository_ (a.k.a. {wikipedia-docs}/Data_access_object[Data Acces
|
||||
.`CustomerRepository` for peristing and accessing `Customers`
|
||||
[source,java]
|
||||
----
|
||||
package example.app.repo;
|
||||
package example.app.books.repo;
|
||||
|
||||
import ...;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user