2016-03-14 00:23:33 -04:00
## Spring Data Couchbase Tutorial Project
### Relevant Articles:
2019-02-28 07:33:41 -05:00
- [Intro to Spring Data Couchbase ](http://www.baeldung.com/spring-data-couchbase )
2016-06-03 08:26:42 -04:00
- [Entity Validation, Query Consistency, and Optimistic Locking in Spring Data Couchbase ](http://www.baeldung.com/entity-validation-locking-and-query-consistency-in-spring-data-couchbase )
2016-10-01 22:25:26 -04:00
- [Multiple Buckets and Spatial View Queries in Spring Data Couchbase ](http://www.baeldung.com/spring-data-couchbase-buckets-and-spatial-view-queries )
2016-03-14 00:23:33 -04:00
### Overview
This Maven project contains the Java code for Spring Data Couchbase
entities, repositories, and template-based services
2016-06-03 08:26:42 -04:00
as described in the tutorials, as well as a unit/integration test
2016-03-14 00:23:33 -04:00
for each service implementation.
### Working with the Code
2016-10-01 22:25:26 -04:00
The project was developed and tested using Java 7 and 8 in the Eclipse-based
2016-03-14 00:23:33 -04:00
Spring Source Toolkit (STS) and therefore should run fine in any
recent version of Eclipse or another IDE of your choice
that supports Java 7 or later.
### Building the Project
You can also build the project using Maven outside of any IDE:
```
mvn clean install
```
2016-10-01 22:25:26 -04:00
### Package Organization
Java classes for the first two tutorials listed above are in src/main/java in the package hierarchy
org.baeldung.spring.data.couchbase
Java classes for the multiple-bucket tutorials are in src/main/java in the package hierarchy
org.baeldung.spring.data.couchbase2b
2016-03-14 00:23:33 -04:00
### Running the tests
2016-10-01 22:25:26 -04:00
The test classes for the single-bucket tutorials are in src/test/java in the package
2016-03-14 00:23:33 -04:00
org.baeldung.spring.data.couchbase.service:
- PersonServiceTest (abstract)
- PersonRepositoryTest (concrete)
- PersonTemplateServiceTest (concrete)
2016-06-03 08:26:42 -04:00
- StudentServiceTest (abstract)
- StudentRepositoryTest (concrete)
- StudentTemplateServiceTest (concrete)
2016-03-14 00:23:33 -04:00
2016-10-01 22:25:26 -04:00
The concrete test classes for the multiple-bucket tutorial are in src/test/java in the package
org.baeldung.spring.data.couchbase2b.service:
- CampusRepositoryServiceImplTest
- PersonRepositoryServiceImplTest
- StudentRepositoryServiceImplTest
2016-06-03 08:26:42 -04:00
The concrete test classes may be run as JUnit tests from your IDE
2016-03-14 00:23:33 -04:00
or using the Maven command line:
```
mvn test
```