diff --git a/cassandra/example/src/main/java/example/springdata/cassandra/basic/BasicUserRepository.java b/cassandra/example/src/main/java/example/springdata/cassandra/basic/BasicUserRepository.java index 93a6da26..84261074 100644 --- a/cassandra/example/src/main/java/example/springdata/cassandra/basic/BasicUserRepository.java +++ b/cassandra/example/src/main/java/example/springdata/cassandra/basic/BasicUserRepository.java @@ -21,8 +21,8 @@ import org.springframework.data.cassandra.repository.Query; import org.springframework.data.repository.CrudRepository; /** - * Simple repository interface for {@link User} instances. The interface is used to declare so called query methods, - * methods to retrieve single entities or collections of them. + * Simple repository interface for {@link User} instances. The interface is used to declare the so-called query methods, + * i.e. methods to retrieve single entities or collections of them. * * @author Thomas Darimont */ diff --git a/cassandra/example/src/test/java/example/springdata/cassandra/events/LifecycleEventsTests.java b/cassandra/example/src/test/java/example/springdata/cassandra/events/LifecycleEventsTests.java index 3b027f6e..9809423a 100644 --- a/cassandra/example/src/test/java/example/springdata/cassandra/events/LifecycleEventsTests.java +++ b/cassandra/example/src/test/java/example/springdata/cassandra/events/LifecycleEventsTests.java @@ -29,7 +29,7 @@ import org.springframework.data.cassandra.core.query.Query; /** * Test showing differences between fetching results as {@link List} and {@link Stream streaming} results using - * Cassandra Lifecyle Events. + * Cassandra Lifecycle Events. * * @author Mark Paluch */ diff --git a/couchbase/example/README.md b/couchbase/example/README.md index 2533a2b2..f4e99a91 100644 --- a/couchbase/example/README.md +++ b/couchbase/example/README.md @@ -4,7 +4,7 @@ This project contains samples of data access features with Spring Data (Couchbas ## Prerequisites -The examples require a running [Couchbase Server](https://www.couchbase.com/downloads) server with the travel sample bucket imported. We assume you're running Couchbase 6.5 and we have updated the `application.properties` class accordingly to adapt RBAC authentication. +The examples require a running [Couchbase Server](https://www.couchbase.com/downloads) with the travel sample bucket imported. We assume you're running Couchbase 6.5 and we have updated the `application.properties` class accordingly to adapt RBAC authentication. For more information, see the [official documentation](https://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#reference). diff --git a/geode/README.md b/geode/README.md index 51469670..047dd6c8 100755 --- a/geode/README.md +++ b/geode/README.md @@ -1,14 +1,14 @@ Spring Data For GemFire and Apache Geode Examples ========================================================= -This project provides a number of examples to get you started using Spring Data for Apache Geode or Pivotal GemFire. These examples are designed to work with [Spring Data for Pivotal GemFire](http://projects.spring.io/spring-data-gemfire) 2.0.9-RELEASE or higher and are organized into the following sub projects: +This project provides a number of examples to get you started using Spring Data for Apache Geode or Pivotal GemFire. These examples are designed to work with [Spring Data for Pivotal GemFire](http://projects.spring.io/spring-data-gemfire) 2.0.9-RELEASE or higher and are organized into the following subprojects: It is important to note that all examples will follow the prescribed Maven directory structure. Examples: * **events** - In this example the test will make use of event handlers and async event queue to handle events. -* **expiration-eviction** - In these examples the server is configured to delete entries after a certain idle period or after a Time-To-Live period (expiration0 or remove data from memory when certain thresholds are reached (eviction). +* **expiration-eviction** - In these examples the server is configured to delete entries after a certain idle period or after a Time-To-Live period (expiration) or remove data from memory when certain thresholds are reached (eviction). * **function-invocation** - In this example the server will have 3 functions registered. The client will invoke each of the functions. * **queries** - In this example a client will query the data in various ways using OQl, continuous queries, and Apache Lucene indexes. * **security** - In this example the servers and clients are set up with security (username/password) authentication using Geode Security and Apache Shiro. @@ -19,4 +19,4 @@ Examples: # Running The Examples Each example has at least one test file located in the test directory. The examples are driven by the tests, so simply run the test either through your IDE or via the commandline. -The logging level of the examples is set to "error", so there will be no output. To see output, simply find the `logback.xml` file located in src/test/resources and set the loglevel to "info". \ No newline at end of file +The logging level of the examples is set to "error", so there will be no output. To see output, simply find the `logback.xml` file located in src/test/resources and set the loglevel to "info". diff --git a/geode/events/src/main/java/example/springdata/geode/server/events/OrderProductSummary.java b/geode/events/src/main/java/example/springdata/geode/server/events/OrderProductSummary.java index 99402d4b..9971223c 100644 --- a/geode/events/src/main/java/example/springdata/geode/server/events/OrderProductSummary.java +++ b/geode/events/src/main/java/example/springdata/geode/server/events/OrderProductSummary.java @@ -23,7 +23,7 @@ import java.io.Serializable; import java.math.BigDecimal; /** - * OrderProductSummary is an object used in the examples to show a summary of all Orders on a per product basis, on a per + * OrderProductSummary is an object used in the examples to show a summary of all Orders on a per-product basis, on a per * timeframe shard (every 10s, or every 1hr) * * @author Udo Kohlmeyer diff --git a/geode/security/src/main/java/example/springdata/geode/client/security/Role.java b/geode/security/src/main/java/example/springdata/geode/client/security/Role.java index aa73b3fe..bdfe999a 100755 --- a/geode/security/src/main/java/example/springdata/geode/client/security/Role.java +++ b/geode/security/src/main/java/example/springdata/geode/client/security/Role.java @@ -82,7 +82,7 @@ public class Role implements Comparable, Iterable, Ser } /** - * Adds (assigns/grants) all given [persmissions][ResourcePermission] to this [Role]. + * Adds (assigns/grants) all given [permissions][ResourcePermission] to this [Role]. * * @param permissions [ResourcePermission]s to assign/grant to this [Role]. * @return this [Role]. @@ -94,13 +94,13 @@ public class Role implements Comparable, Iterable, Ser } /** - * Adds (assigns/grants) all given [persmissions][ResourcePermission] to this [Role]. + * Adds (assigns/grants) all given [permissions][ResourcePermission] to this [Role]. * * @param permissions [ResourcePermission]s to assign/grant to this [Role]. * @return this [Role]. * @see ResourcePermission */ - public Role withPersmissions(Iterable permissions) { + public Role withPermissions(Iterable permissions) { this.permissions.addAll((Collection) permissions); return this; } diff --git a/geode/security/src/main/java/example/springdata/geode/client/security/User.java b/geode/security/src/main/java/example/springdata/geode/client/security/User.java index 449301f5..5453874d 100755 --- a/geode/security/src/main/java/example/springdata/geode/client/security/User.java +++ b/geode/security/src/main/java/example/springdata/geode/client/security/User.java @@ -79,7 +79,7 @@ public class User implements Comparable, Cloneable, Principal, Serializabl /** * Determines whether this [User] has been granted (assigned) the given [permission][ResourcePermission]. * - * @param permission [ResourcePermission] to evalute. + * @param permission [ResourcePermission] to evaluate. * @return a boolean value indicating whether this [User] has been granted (assigned) the given [ResourcePermission]. * @see ResourcePermission */ diff --git a/geode/security/src/main/java/example/springdata/geode/client/security/server/SecurityManagerProxy.java b/geode/security/src/main/java/example/springdata/geode/client/security/server/SecurityManagerProxy.java index 77d63b4a..27c35231 100644 --- a/geode/security/src/main/java/example/springdata/geode/client/security/server/SecurityManagerProxy.java +++ b/geode/security/src/main/java/example/springdata/geode/client/security/server/SecurityManagerProxy.java @@ -42,7 +42,7 @@ public class SecurityManagerProxy extends LazyWiringDeclarableSupport private org.apache.geode.security.SecurityManager securityManager; /** - * Constructs an instance of the {@link SecurityManagerProxy}, whick will delegate all Apache Geode security + * Constructs an instance of the {@link SecurityManagerProxy}, which will delegate all Apache Geode security * operations to a Spring managed {@link org.apache.geode.security.SecurityManager} bean. */ public SecurityManagerProxy() { diff --git a/jdbc/howto/bidirectionalexternal/pom.xml b/jdbc/howto/bidirectionalexternal/pom.xml index f2a2d16d..0a66d24c 100644 --- a/jdbc/howto/bidirectionalexternal/pom.xml +++ b/jdbc/howto/bidirectionalexternal/pom.xml @@ -15,7 +15,7 @@ Spring Data JDBC - How to model bidirectional relationships between aggregates Sample project for Spring Data JDBC demonstrating how to model bidirectional relationships between aggregates. - It serves as a source code repository for a How To article on the Spring Blog + It serves as a source code repository for a How-To article on the Spring Blog https://projects.spring.io/spring-data-jdbc 2021 - \ No newline at end of file + diff --git a/jdbc/howto/bidirectionalinternal/pom.xml b/jdbc/howto/bidirectionalinternal/pom.xml index 246b2ed1..9d0a2183 100644 --- a/jdbc/howto/bidirectionalinternal/pom.xml +++ b/jdbc/howto/bidirectionalinternal/pom.xml @@ -15,7 +15,7 @@ Spring Data JDBC - How to model aggregate internal bidirectional relationships Sample project for Spring Data JDBC demonstrating how to model aggregate internal bidirectional relationships. - It serves as a source code repository for a How To article on the Spring Blog + It serves as a source code repository for a How-To article on the Spring Blog https://projects.spring.io/spring-data-jdbc 2021 - \ No newline at end of file + diff --git a/jdbc/howto/idgeneration/pom.xml b/jdbc/howto/idgeneration/pom.xml index 523a0279..1c7fc979 100644 --- a/jdbc/howto/idgeneration/pom.xml +++ b/jdbc/howto/idgeneration/pom.xml @@ -13,7 +13,7 @@ Spring Data JDBC - How to ID generation Sample project for Spring Data JDBC demonstrating the various options to use user defined IDs in Spring Data JDBC aggregates. - It serves as a source code repository for a How To article on the Spring Blog + It serves as a source code repository for a How-To article on the Spring Blog https://projects.spring.io/spring-data-jdbc 2021 diff --git a/jdbc/immutables/src/main/java/example/springdata/jdbc/immutables/Application.java b/jdbc/immutables/src/main/java/example/springdata/jdbc/immutables/Application.java index 081c541c..9b76b34a 100644 --- a/jdbc/immutables/src/main/java/example/springdata/jdbc/immutables/Application.java +++ b/jdbc/immutables/src/main/java/example/springdata/jdbc/immutables/Application.java @@ -84,7 +84,7 @@ class Application { @Override public T mapRow(RelationalPersistentEntity entity, ResultSet resultSet, Object key) { - // rows will not mapped to the entity interface, but to its implementation generated by Immutable + // rows will not be mapped to the entity interface, but to its implementation generated by Immutable RelationalPersistentEntity implementationEntity = getImplementationEntity(mappingContext, entity); return super.mapRow(implementationEntity, resultSet, key); } @@ -93,7 +93,7 @@ class Application { public T mapRow(PersistentPropertyPathExtension path, ResultSet resultSet, Identifier identifier, Object key) { - // rows will not mapped to the entity interface, but to its implementation generated by Immutable + // rows will not be mapped to the entity interface, but to its implementation generated by Immutable RelationalPersistentEntity implementationEntity = getImplementationEntity(mappingContext, path.getLeafEntity()); var propertyPath = new DelegatePersistentPropertyPathExtension(mappingContext, diff --git a/jdbc/mybatis/README.adoc b/jdbc/mybatis/README.adoc index 131224d1..d6d5b1ce 100644 --- a/jdbc/mybatis/README.adoc +++ b/jdbc/mybatis/README.adoc @@ -7,4 +7,4 @@ The map of models is maintained by two statements configured in MyBatis mappings `example.springdata.jdbc.mybatis.LegoSetMapper.findAllByProperty-models` showcases how a map can be loaded by configuring the select to return instances of `Map.Entry` -`example.springdata.jdbc.mybatis.Model.insert` showcases how one can access the `MyBatixContext` and thereby the instance to save and the key of the parent entity. +`example.springdata.jdbc.mybatis.Model.insert` showcases how one can access the `MyBatisContext` and thereby the instance to save and the key of the parent entity. diff --git a/jpa/example/src/main/java/example/springdata/jpa/auditing/AuditableUser.java b/jpa/example/src/main/java/example/springdata/jpa/auditing/AuditableUser.java index 044f4c34..483042a8 100644 --- a/jpa/example/src/main/java/example/springdata/jpa/auditing/AuditableUser.java +++ b/jpa/example/src/main/java/example/springdata/jpa/auditing/AuditableUser.java @@ -34,7 +34,7 @@ import org.springframework.data.jpa.domain.AbstractAuditable; import org.springframework.data.jpa.domain.support.AuditingEntityListener; /** - * User domain class that uses auditing functionality of Spring Data that can either be aquired implementing + * User domain class that uses auditing functionality of Spring Data that can either be acquired implementing * {@link Auditable} or extend {@link AbstractAuditable}. * * @author Oliver Gierke diff --git a/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImpl.java b/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImpl.java index b0af8db0..a91096fb 100644 --- a/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImpl.java +++ b/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImpl.java @@ -22,7 +22,7 @@ import javax.persistence.PersistenceContext; /** * Implementation fo the custom repository functionality declared in {@link UserRepositoryCustom} based on JPA. To use - * this implementation in combination with Spring Data JPA you can either register it programatically: + * this implementation in combination with Spring Data JPA you can either register it programmatically: * *
  * EntityManager em = ... // Obtain EntityManager
diff --git a/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImplJdbc.java b/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImplJdbc.java
index 911979d1..1e156e2d 100644
--- a/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImplJdbc.java
+++ b/jpa/example/src/main/java/example/springdata/jpa/custom/UserRepositoryImplJdbc.java
@@ -28,7 +28,7 @@ import org.springframework.jdbc.core.support.JdbcDaoSupport;
 import org.springframework.stereotype.Component;
 
 /**
- * Class with the implementation of the custom repository code. Uses JDBC in this case. For basic programatic setup see
+ * Class with the implementation of the custom repository code. Uses JDBC in this case. For basic programmatic setup see
  * {@link UserRepositoryImpl} for examples.
  * 

* As you need to hand the instance a {@link javax.sql.DataSource} or diff --git a/jpa/example/src/main/java/example/springdata/jpa/simple/SimpleUserRepository.java b/jpa/example/src/main/java/example/springdata/jpa/simple/SimpleUserRepository.java index 3f666faa..51aa6b1f 100644 --- a/jpa/example/src/main/java/example/springdata/jpa/simple/SimpleUserRepository.java +++ b/jpa/example/src/main/java/example/springdata/jpa/simple/SimpleUserRepository.java @@ -28,8 +28,8 @@ import org.springframework.data.repository.CrudRepository; import org.springframework.scheduling.annotation.Async; /** - * Simple repository interface for {@link User} instances. The interface is used to declare so called query methods, - * methods to retrieve single entities or collections of them. + * Simple repository interface for {@link User} instances. The interface is used to declare the so-called query methods, + * i.e. methods to retrieve single entities or collections of them. * * @author Oliver Gierke * @author Thomas Darimont diff --git a/jpa/example/src/test/java/example/springdata/jpa/customall/UserRepositoryCustomizationTests.java b/jpa/example/src/test/java/example/springdata/jpa/customall/UserRepositoryCustomizationTests.java index 0ed3a554..00e0f95b 100644 --- a/jpa/example/src/test/java/example/springdata/jpa/customall/UserRepositoryCustomizationTests.java +++ b/jpa/example/src/test/java/example/springdata/jpa/customall/UserRepositoryCustomizationTests.java @@ -24,7 +24,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; /** - * Intergration test showing the usage of a custom method implemented for all repositories + * Integration test showing the usage of a custom method implemented for all repositories * * @author Oliver Gierke * @author Divya Srivastava diff --git a/jpa/example/src/test/java/example/springdata/jpa/simple/SimpleUserRepositoryTests.java b/jpa/example/src/test/java/example/springdata/jpa/simple/SimpleUserRepositoryTests.java index 3cf1b6d1..9c4da22d 100644 --- a/jpa/example/src/test/java/example/springdata/jpa/simple/SimpleUserRepositoryTests.java +++ b/jpa/example/src/test/java/example/springdata/jpa/simple/SimpleUserRepositoryTests.java @@ -154,7 +154,7 @@ class SimpleUserRepositoryTests { var user2 = new User(); user2.setLastname("lastname-2"); - // we deliberatly save the items in reverse + // we deliberately save the items in reverse repository.saveAll(Arrays.asList(user2, user1, user0)); var result = repository.findFirst2ByOrderByLastnameAsc(); @@ -253,7 +253,7 @@ class SimpleUserRepositoryTests { /** * Here we demonstrate the usage of {@link CompletableFuture} as a result wrapper for asynchronous repository query * methods. Note, that we need to disable the surrounding transaction to be able to asynchronously read the written - * data from from another thread within the same test method. + * data from another thread within the same test method. */ @Test @Transactional(propagation = Propagation.NOT_SUPPORTED) diff --git a/jpa/jpa21/README.md b/jpa/jpa21/README.md index 89be21ee..3683ef2f 100644 --- a/jpa/jpa21/README.md +++ b/jpa/jpa21/README.md @@ -5,7 +5,7 @@ This project contains samples of JPA 2.1 specific features of Spring Data JPA. ## Support for declarative Fetch Graphs customization You can customize the loading of entity associations via EntityGraphs. JPA 2.1 provides the `NamedEntityGraph` annotation -that allows you define fetching behavior in a flexible way. +that allows you to define fetching behavior in a flexible way. In Spring Data JPA we support to specify which fetch-graph to use for a repository query method via the `EntityGraph` annotation. @@ -15,7 +15,7 @@ You can refer to a fetch graph by name like in the following example. Product findOneById(Long id); ``` -We also offer an alternative and more concise way to declarativly specify a fetch graph for a repository query method in an +We also offer an alternative and more concise way to declaratively specify a fetch graph for a repository query method in an ad-hoc manner: ```java @EntityGraph(attributePaths = "tags") @@ -61,7 +61,7 @@ Spring Data JPA repository declaration to execute procedures: public interface UserRepository extends CrudRepository { // Explicitly mapped to named stored procedure {@code User.plus1} in the {@link EntityManager}. - // By default, we would've try to find a procedure declaration named User.plus1BackedByOtherNamedStoredProcedure + // By default, we would've tried to find a procedure declaration named User.plus1BackedByOtherNamedStoredProcedure @Procedure(name = "User.plus1") Integer plus1BackedByOtherNamedStoredProcedure(@Param("arg") Integer arg); @@ -126,4 +126,4 @@ interface SubscriptionRepository extends CrudRepository { @Query(nativeQuery = true) List findAllSubscriptionSummaries(); } -``` \ No newline at end of file +``` diff --git a/jpa/jpa21/src/main/java/example/springdata/jpa/storedprocedures/UserRepository.java b/jpa/jpa21/src/main/java/example/springdata/jpa/storedprocedures/UserRepository.java index f023e7d9..546306ed 100644 --- a/jpa/jpa21/src/main/java/example/springdata/jpa/storedprocedures/UserRepository.java +++ b/jpa/jpa21/src/main/java/example/springdata/jpa/storedprocedures/UserRepository.java @@ -21,8 +21,8 @@ import org.springframework.data.jpa.repository.query.Procedure; import org.springframework.data.repository.CrudRepository; /** - * Simple repository interface for {@link User} instances. The interface is used to declare so called query methods, - * methods to retrieve single entities or collections of them. + * Simple repository interface for {@link User} instances. The interface is used to declare the so-called query methods, + * i.e. methods to retrieve single entities or collections of them. * * @author Oliver Gierke * @author Thomas Darimont diff --git a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/DataInitializer.java b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/DataInitializer.java index 4bd16cd1..ff1e8f33 100644 --- a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/DataInitializer.java +++ b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/DataInitializer.java @@ -38,8 +38,8 @@ import org.springframework.util.Assert; * create a dedicated annotation meta-annotated with {@code @Transactional("…")} to be able to refer to a particular * data source without using String qualifiers. *

- * Also, not that one cannot interact with both databases in a single, transactional method as transactions are thread - * bound in Spring an thus only a single transaction can be active in a single thread. See {@link Application#init()} + * Also, note that one cannot interact with both databases in a single, transactional method as transactions are thread + * bound in Spring and thus only a single transaction can be active in a single thread. See {@link Application#init()} * for how to orchestrate the calls. * * @author Oliver Gierke diff --git a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/customer/CustomerConfig.java b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/customer/CustomerConfig.java index 4823bca8..07aa303f 100644 --- a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/customer/CustomerConfig.java +++ b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/customer/CustomerConfig.java @@ -32,7 +32,7 @@ import org.springframework.transaction.PlatformTransactionManager; * Configuration for the {@link Customer} slice of the system. A dedicated {@link DataSource}, * {@link JpaTransactionManager} and {@link EntityManagerFactory}. Note that there could of course be some deduplication * with {@link example.springdata.jpa.multipleds.order.OrderConfig}. I just decided to keep it to focus on the - * sepeartion of the two. Also, some overlaps might not even occur in real world scenarios (whether to create DDl or the + * separation of the two. Also, some overlaps might not even occur in real world scenarios (whether to create DDl or the * like). * * @author Oliver Gierke diff --git a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/order/OrderConfig.java b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/order/OrderConfig.java index 0c1bcd77..228aeb05 100644 --- a/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/order/OrderConfig.java +++ b/jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/order/OrderConfig.java @@ -32,7 +32,7 @@ import org.springframework.transaction.PlatformTransactionManager; * Configuration for the {@link Order} slice of the system. A dedicated {@link DataSource}, * {@link JpaTransactionManager} and {@link EntityManagerFactory}. Note that there could of course be some deduplication * with {@link example.springdata.jpa.multipleds.customer.CustomerConfig}. I just decided to keep it to focus on the - * sepeartion of the two. Also, some overlaps might not even occur in real world scenarios (whether to create DDl or the + * separation of the two. Also, some overlaps might not even occur in real world scenarios (whether to create DDl or the * like). * * @author Oliver Gierke diff --git a/jpa/security/src/main/java/example/springdata/jpa/security/SecureBusinessObjectRepository.java b/jpa/security/src/main/java/example/springdata/jpa/security/SecureBusinessObjectRepository.java index bb1d2b01..c6cf3c4d 100644 --- a/jpa/security/src/main/java/example/springdata/jpa/security/SecureBusinessObjectRepository.java +++ b/jpa/security/src/main/java/example/springdata/jpa/security/SecureBusinessObjectRepository.java @@ -33,7 +33,7 @@ interface SecureBusinessObjectRepository extends Repository * select o from BusinessObject o where o.owner.emailAddress like ? - * and set the the result SpEL expression evaluated at method invocation time as parameter value. + * and set the result SpEL expression evaluated at method invocation time as parameter value. * * @return */ @@ -41,7 +41,7 @@ interface SecureBusinessObjectRepository extends Repository findBusinessObjectsForCurrentUser(); /** - * Here we apply a dynamic filter condition in there query depending of the role of the current principal. + * Here we apply a dynamic filter condition in the query depending on the role of the current principal. * * @return */ @@ -53,5 +53,5 @@ interface SecureBusinessObjectRepository extends Repository { } ``` -The test cases in `PersonRepositoryIntegrationTests` show basic interaction to search, create and modify objects stored in a LDAP repository. +The test cases in `PersonRepositoryIntegrationTests` show basic interaction to search, create and modify objects stored in an LDAP repository. diff --git a/ldap/example/src/main/java/example/springdata/ldap/ApplicationConfiguration.java b/ldap/example/src/main/java/example/springdata/ldap/ApplicationConfiguration.java index 3f17a82a..fccb89b8 100644 --- a/ldap/example/src/main/java/example/springdata/ldap/ApplicationConfiguration.java +++ b/ldap/example/src/main/java/example/springdata/ldap/ApplicationConfiguration.java @@ -18,7 +18,7 @@ package example.springdata.ldap; import org.springframework.boot.autoconfigure.SpringBootApplication; /** - * Test configuration to spin up a in-memory LDAP server (see {@code application.properties}). Also enables Spring Data + * Test configuration to spin up an in-memory LDAP server (see {@code application.properties}). Also enables Spring Data * repositories for LDAP. * * @author Mark Paluch diff --git a/mongodb/example/src/main/java/example/springdata/mongodb/customer/CustomerRepository.java b/mongodb/example/src/main/java/example/springdata/mongodb/customer/CustomerRepository.java index a1fd0ca6..ef239160 100644 --- a/mongodb/example/src/main/java/example/springdata/mongodb/customer/CustomerRepository.java +++ b/mongodb/example/src/main/java/example/springdata/mongodb/customer/CustomerRepository.java @@ -42,7 +42,7 @@ public interface CustomerRepository extends CrudRepository { List findByLastname(String lastname, Sort sort); /** - * Show case for a repository query using geo-spatial functionality. + * Showcase for a repository query using geospatial functionality. * * @param point * @param distance diff --git a/mongodb/example/src/main/java/example/springdata/mongodb/immutable/ApplicationConfiguration.java b/mongodb/example/src/main/java/example/springdata/mongodb/immutable/ApplicationConfiguration.java index 583e9cb2..27dffa5b 100644 --- a/mongodb/example/src/main/java/example/springdata/mongodb/immutable/ApplicationConfiguration.java +++ b/mongodb/example/src/main/java/example/springdata/mongodb/immutable/ApplicationConfiguration.java @@ -45,7 +45,7 @@ class ApplicationConfiguration { var randomNumber = ThreadLocalRandom.current().nextInt(1, 100); - // withRandomNumber is a so called wither method returning a new instance of the entity with a new value assigned + // withRandomNumber is a so-called wither method returning a new instance of the entity with a new value assigned return immutablePerson.withRandomNumber(randomNumber); }; } diff --git a/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java b/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java index 4d1e370b..2c2352d3 100644 --- a/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java +++ b/mongodb/example/src/test/java/example/springdata/mongodb/customer/CustomerRepositoryIntegrationTest.java @@ -108,7 +108,7 @@ class CustomerRepositoryIntegrationTest { } /** - * Test case to show the usage of the geo-spatial APIs to lookup people within a given distance of a reference point. + * Test case to show the usage of the geospatial APIs to lookup people within a given distance of a reference point. */ @Test void exposesGeoSpatialFunctionality() { diff --git a/mongodb/fluent-api/README.md b/mongodb/fluent-api/README.md index 274bc382..45fdd5a8 100644 --- a/mongodb/fluent-api/README.md +++ b/mongodb/fluent-api/README.md @@ -31,7 +31,7 @@ mongoOps.query(SWCharacter.class) ``` -Different stages in the command essembly process allow to seamlessly switch to different API paths. Using `near` instead of `matching` switches to the path for geo queries requireing the presence of a `NearQuery` while altering the command result type from `List` to `GeoResults` and limiting terminating operations to just `all()`. +Different stages in the command assembly process allow to seamlessly switch to different API paths. Using `near` instead of `matching` switches to the path for geo queries requiring the presence of a `NearQuery` while altering the command result type from `List` to `GeoResults` and limiting terminating operations to just `all()`. ```java diff --git a/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/jpastyle/JpaStyleDocRefTests.java b/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/jpastyle/JpaStyleDocRefTests.java index fdc1ea5f..0410beb7 100644 --- a/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/jpastyle/JpaStyleDocRefTests.java +++ b/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/jpastyle/JpaStyleDocRefTests.java @@ -51,7 +51,7 @@ public class JpaStyleDocRefTests { @Autowired MongoOperations operations; /** - * Load linked documents where where the actual reference is stored in the obverse side of the association. + * Load linked documents where the actual reference is stored in the obverse side of the association. */ @Test void saveAndLoadJpaStyleRelation() { @@ -63,12 +63,12 @@ public class JpaStyleDocRefTests { Employee employee1 = new Employee("greedo-tetsu-jr", "greedo"); employee1.setManagerId(manager.getId()); // establish the link to the manager document operations.save(employee1); - // no need to update he manager document after save of employee + // no need to update the manager document after save of employee Employee employee2 = new Employee("boba-fett", "boba"); employee2.setManagerId(manager.getId()); // establish the link to the manager document operations.save(employee2); - // no need to update he manager document after save of employee + // no need to update the manager document after save of employee operations.execute(Manager.class, collection -> { diff --git a/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/query/QueryDocRefTests.java b/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/query/QueryDocRefTests.java index 57d0c02b..622386e7 100644 --- a/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/query/QueryDocRefTests.java +++ b/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/query/QueryDocRefTests.java @@ -54,7 +54,7 @@ public class QueryDocRefTests { @Autowired MongoOperations operations; /** - * Load linked documents where where the reference is stored on the inverse and evaluated against a non id property on + * Load linked documents where the reference is stored on the inverse and evaluated against a non id property on * the obverse side of the association. */ @Test diff --git a/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/simple/SimpleDocRefTests.java b/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/simple/SimpleDocRefTests.java index 3ad64959..c77dad15 100644 --- a/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/simple/SimpleDocRefTests.java +++ b/mongodb/linking/src/test/java/example/springdata/mongodb/linking/docref/simple/SimpleDocRefTests.java @@ -54,7 +54,7 @@ public class SimpleDocRefTests { @Autowired MongoOperations operations; /** - * Load linked documents where where the reference is stored on the inverse and evaluated against the id property on + * Load linked documents where the reference is stored on the inverse and evaluated against the id property on * the obverse side of the association. */ @Test diff --git a/mongodb/query-by-example/src/main/java/example/springdata/mongodb/querybyexample/ContactRepository.java b/mongodb/query-by-example/src/main/java/example/springdata/mongodb/querybyexample/ContactRepository.java index 22a4313d..299446ec 100644 --- a/mongodb/query-by-example/src/main/java/example/springdata/mongodb/querybyexample/ContactRepository.java +++ b/mongodb/query-by-example/src/main/java/example/springdata/mongodb/querybyexample/ContactRepository.java @@ -20,7 +20,7 @@ import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; /** - * Repository interface for {@link Contact} and sub-types. + * Repository interface for {@link Contact} and subtypes. * * @author Oliver Gierke */ diff --git a/mongodb/schema-validation/README.md b/mongodb/schema-validation/README.md index c484de17..16a239f9 100644 --- a/mongodb/schema-validation/README.md +++ b/mongodb/schema-validation/README.md @@ -59,7 +59,7 @@ MongoJsonSchema schema = MongoJsonSchema.builder() // ).build(); ``` -The schema can be used for various funcitionality: Set up `Document` validation for a collection: +The schema can be used for various functionality: Set up `Document` validation for a collection: ```java template.createCollection(Jedi.class, CollectionOptions.empty().validator(Validator.schema(schema))); diff --git a/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchRepositoryTests.java b/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchRepositoryTests.java index 2174f048..cd95c8fc 100644 --- a/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchRepositoryTests.java +++ b/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchRepositoryTests.java @@ -55,7 +55,7 @@ class TextSearchRepositoryTests { /** * Show how to do simple matching.
- * Note that text search is case insensitive and will also find entries like {@literal releases}. + * Note that text search is case-insensitive and will also find entries like {@literal releases}. */ @Test void findAllBlogPostsWithRelease() { diff --git a/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchTemplateTests.java b/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchTemplateTests.java index a72d64cb..87f3ea52 100644 --- a/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchTemplateTests.java +++ b/mongodb/text-search/src/test/java/example/springdata/mongodb/textsearch/TextSearchTemplateTests.java @@ -53,7 +53,7 @@ class TextSearchTemplateTests { @Autowired MongoOperations operations; /** - * Show how to do simple matching. Note that text search is case insensitive and will also find entries like + * Show how to do simple matching. Note that text search is case-insensitive and will also find entries like * {@literal releases}. */ @Test diff --git a/multi-store/README.md b/multi-store/README.md index 7875ee65..edb4b989 100644 --- a/multi-store/README.md +++ b/multi-store/README.md @@ -1,6 +1,6 @@ # Spring Data - Multi-store example -This sample shows a project working with multiple Spring Data modules and how the repository auto-detection has become more strict with the Evans release train. +This sample shows a project working with multiple Spring Data modules and how the repository auto-detection has become stricter with the Evans release train. If you run `ApplicationConfigurationTest` you should see the following output: diff --git a/redis/cluster-sentinel/README.md b/redis/cluster-sentinel/README.md index 1c6e89f5..04a67d3b 100644 --- a/redis/cluster-sentinel/README.md +++ b/redis/cluster-sentinel/README.md @@ -1,5 +1,5 @@ # Spring Data Redis Example -The this example was named a bit misleading as `cluster-sentinel` is a mix of Redis Cluster and Redis Sentinel. +This example was named a bit misleadingly as `cluster-sentinel`, a mix of Redis Cluster and Redis Sentinel. Find dedicated examples here: [Redis Cluster](../cluster) and [Redis Sentinel](../sentinel). diff --git a/redis/cluster/readme.md b/redis/cluster/readme.md index 8ef68430..b1a1a172 100644 --- a/redis/cluster/readme.md +++ b/redis/cluster/readme.md @@ -6,7 +6,7 @@ To run the code in this sample a running cluster environment is required. Please ## Support for Cluster ## -Cluster Support uses the same building blocks as the non clustered counterpart. We use `application.properties` to point to an initial set of known cluster nodes which will be picked up by the auto configuration. +Cluster Support uses the same building blocks as the non-clustered counterpart. We use `application.properties` to point to an initial set of known cluster nodes which will be picked up by the auto-configuration. ```properties spring.redis.cluster.nodes[0]=127.0.0.1:30001 @@ -81,7 +81,7 @@ redis/src $ ./redis-cli -c -p 30001 321978... 127.0.0.1:30006 slave 5f3e97... 0 1450765113050 6 connected ``` -To shutdown the cluster use the `create-cluster stop` command. +To shut down the cluster use the `create-cluster stop` command. ```bash redis/utils/create-cluster $ ./create-cluster stop diff --git a/redis/repositories/README.md b/redis/repositories/README.md index 23ed1109..38fb92d9 100644 --- a/redis/repositories/README.md +++ b/redis/repositories/README.md @@ -2,7 +2,7 @@ This project contains examples for Spring Data specific repository abstraction on top of Redis. -## Repository Suport ## +## Repository Support ## Redis Repository support allows to convert, store, retrieve and index entities within Redis native data structures. To do, besides the `HASH` containing the actual properties several [Secondary Index](http://redis.io/topics/indexes) structures are set up and maintained. diff --git a/redis/repositories/src/main/java/example/springdata/redis/repositories/Person.java b/redis/repositories/src/main/java/example/springdata/redis/repositories/Person.java index 41f06f2e..9fff3730 100644 --- a/redis/repositories/src/main/java/example/springdata/redis/repositories/Person.java +++ b/redis/repositories/src/main/java/example/springdata/redis/repositories/Person.java @@ -90,7 +90,7 @@ class Person { private Gender gender; /** - * Since {@link Indexed} is used on {@link Address#getCity()} index structures for {@code persons:address:city} are be + * Since {@link Indexed} is used on {@link Address#getCity()}, index structures for {@code persons:address:city} are * maintained. */ private Address address; diff --git a/redis/streams/src/test/java/example/springdata/redis/reactive/ReactiveStreamApiTests.java b/redis/streams/src/test/java/example/springdata/redis/reactive/ReactiveStreamApiTests.java index e2d74920..2ed3a06c 100644 --- a/redis/streams/src/test/java/example/springdata/redis/reactive/ReactiveStreamApiTests.java +++ b/redis/streams/src/test/java/example/springdata/redis/reactive/ReactiveStreamApiTests.java @@ -82,7 +82,7 @@ class ReactiveStreamApiTests { .as(StepVerifier::create) .expectNext(2L).verifyComplete(); - // XADD errors when timestamp is less then last inserted + // XADD errors when timestamp is less than the last inserted streamOps.add(SensorData.create("1234", "19.8", "invalid").withId(RecordId.of("0-0"))) .as(StepVerifier::create) .verifyError(RedisSystemException.class); diff --git a/redis/streams/src/test/java/example/springdata/redis/sync/SyncStreamApiTests.java b/redis/streams/src/test/java/example/springdata/redis/sync/SyncStreamApiTests.java index e09aa66d..e5369e86 100644 --- a/redis/streams/src/test/java/example/springdata/redis/sync/SyncStreamApiTests.java +++ b/redis/streams/src/test/java/example/springdata/redis/sync/SyncStreamApiTests.java @@ -72,7 +72,7 @@ class SyncStreamApiTests { // XLEN assertThat(streamOps.size(SensorData.KEY)).isEqualTo(2L); - // XADD errors when timestamp is less then last inserted + // XADD errors when timestamp is less than the last inserted assertThatExceptionOfType(RedisSystemException.class).isThrownBy(() -> { streamOps.add(SensorData.create("1234", "19.8", "invalid").withId(RecordId.of("0-0"))); }).withMessageContaining("ID specified"); diff --git a/rest/projections/src/test/java/example/springdata/rest/projections/SimpleProjectionTests.java b/rest/projections/src/test/java/example/springdata/rest/projections/SimpleProjectionTests.java index ff14d8ee..061d93d5 100644 --- a/rest/projections/src/test/java/example/springdata/rest/projections/SimpleProjectionTests.java +++ b/rest/projections/src/test/java/example/springdata/rest/projections/SimpleProjectionTests.java @@ -27,7 +27,7 @@ import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; /** - * Test cases showing the programatic use of a {@link ProjectionFactory}. + * Test cases showing the programmatic use of a {@link ProjectionFactory}. * * @author Oliver Gierke * @author Divya Srivastava diff --git a/rest/security/src/main/java/example/springdata/rest/security/Application.java b/rest/security/src/main/java/example/springdata/rest/security/Application.java index 28ff3ab1..efd2bcfd 100644 --- a/rest/security/src/main/java/example/springdata/rest/security/Application.java +++ b/rest/security/src/main/java/example/springdata/rest/security/Application.java @@ -48,7 +48,7 @@ public class Application { } /** - * Pre-load the system with employees and items. + * Preload the system with employees and items. */ public @PostConstruct void init() { diff --git a/rest/starbucks/README.md b/rest/starbucks/README.md index 332381c8..b5f3aac4 100644 --- a/rest/starbucks/README.md +++ b/rest/starbucks/README.md @@ -1,6 +1,6 @@ # Spring Data REST - Starbucks example -This sample app exposes 10843 Starbucks coffee shops via a RESTful API that allows to access the stores in a hypermedia based way and exposes a resource to execute geo-location search for coffee shops. +This sample app exposes 10843 Starbucks coffee shops via a RESTful API that allows to access the stores in a hypermedia based way and exposes a resource to execute geolocation search for coffee shops. ## Quickstart diff --git a/rest/starbucks/src/main/java/example/springdata/rest/stores/StoreInitializer.java b/rest/starbucks/src/main/java/example/springdata/rest/stores/StoreInitializer.java index 9c0f6d52..2f27b74e 100644 --- a/rest/starbucks/src/main/java/example/springdata/rest/stores/StoreInitializer.java +++ b/rest/starbucks/src/main/java/example/springdata/rest/stores/StoreInitializer.java @@ -36,7 +36,7 @@ import org.springframework.data.mongodb.core.index.IndexResolver; import org.springframework.stereotype.Component; /** - * Component initializing a hand full of Starbucks stores and persisting them through a {@link StoreRepository}. + * Component initializing a handful of Starbucks stores and persisting them through a {@link StoreRepository}. * * @author Oliver Gierke * @author Mark Paluch @@ -65,7 +65,7 @@ public class StoreInitializer { /** * Reads a file {@code starbucks.csv} from the class path and parses it into {@link Store} instances about to - * persisted. + * be persisted. * * @return * @throws Exception diff --git a/rest/uri-customization/readme.adoc b/rest/uri-customization/readme.adoc index 721ee805..8ff25db6 100644 --- a/rest/uri-customization/readme.adoc +++ b/rest/uri-customization/readme.adoc @@ -18,7 +18,7 @@ public class SpringDataRestCustomization extends RepositoryRestConfigurerAdapter } ---- -As you can see the `EntityLookupRegistrar` obtained via `RepositoryrestConfiguration.withCustomEntityLookup()` takes two method references. +As you can see the `EntityLookupRegistrar` obtained via `RepositoryRestConfiguration.withCustomEntityLookup()` takes two method references. The first one defines the identifier mapping, the second one defines how to look up the entity using the repository. The customization could also be defined in a slightly more explicit way like this: @@ -30,7 +30,7 @@ config.withCustomEntityLookup(). withLookup(UserRepository::findByUsername); ---- -In non-Java 8 environments the method references would have to be replaced with a quite verbose anonymous inner class, so that it's probably easier to implement `EntityLookup` explixitly and declare it as Spring bean: +In non-Java 8 environments the method references would have to be replaced with a quite verbose anonymous inner class, so that it's probably easier to implement `EntityLookup` explicitly and declare it as Spring bean: [source, java] ---- diff --git a/web/example/src/main/java/example/users/Password.java b/web/example/src/main/java/example/users/Password.java index 4ab73b66..2850741c 100644 --- a/web/example/src/main/java/example/users/Password.java +++ b/web/example/src/main/java/example/users/Password.java @@ -56,7 +56,7 @@ public class Password implements CharSequence { /** * Creates a new encrypted {@link Password} for the given {@link String}. Note how this method is package protected so - * that encrypted passwords can only created by components in this package and not accidentally by clients using the + * that encrypted passwords can only be created by components in this package and not accidentally by clients using the * type from other packages. * * @param password must not be {@literal null} or empty. diff --git a/web/example/src/main/java/example/users/web/UserController.java b/web/example/src/main/java/example/users/web/UserController.java index b5d8da51..6ee6339a 100644 --- a/web/example/src/main/java/example/users/web/UserController.java +++ b/web/example/src/main/java/example/users/web/UserController.java @@ -58,7 +58,7 @@ class UserController { private final UserManagement userManagement; /** - * Equis the model with a {@link Page} of {@link User}s. Spring Data automatically populates the {@link Pageable} from + * Populates the model with a {@link Page} of {@link User}s. Spring Data automatically populates the {@link Pageable} from * request data according to the setup of {@link PageableHandlerMethodArgumentResolver}. Note how the defaults can be * tweaked by using {@link PageableDefault}. * diff --git a/web/projection/README.md b/web/projection/README.md index a128376c..9fa6f0f9 100644 --- a/web/projection/README.md +++ b/web/projection/README.md @@ -22,9 +22,9 @@ This type is used in `UserController.index(…)` and basically combines two mode ## Binding request data via JSON Path expression -The `@JsonPath` annotations bind the values obtained by evaluating the expressions from the request. The sample is using a recursive property lookup for `firstname` and `lastname`. Using those expressions allows the payload thats received to slightly changed and the code dealing with not having to be changed. +The `@JsonPath` annotations bind the values obtained by evaluating the expressions from the request. The sample is using a recursive property lookup for `firstname` and `lastname`. Using those expressions allows the payload that received to slightly changed and the code dealing with not having to be changed. -As an example using that on the server side can be found in `UserControllerIntegrationTests`. The tests sends two different flavors of JSON to simulate a change in behavior of the client and the server can handle both representation formats without the need for a change. +As an example using that on the server side can be found in `UserControllerIntegrationTests`. The tests send two different flavors of JSON to simulate a change in behavior of the client and the server can handle both representation formats without the need for a change. This is also very useful on the client side which is simulated in `UserControllerClientTests` setting up a `RestTemplate` with the newly introduced `HttpMessageConverters` so that the projection interface can be used to access the payload. See how the test case accesses different HTTP resources, that simulate a change in the representation on the server side. diff --git a/web/querydsl/README.md b/web/querydsl/README.md index 03a0764f..b8aab84c 100644 --- a/web/querydsl/README.md +++ b/web/querydsl/README.md @@ -30,7 +30,7 @@ class UserController { } ``` -As you can see `Predicate` can be used as Spring MVC controller argument. It will automatically populate such a `Predicate` with values from the current request based on the type configured in `@QuerydslPredicate`. Explicit bindings can be configured by either explictly defining one in the annotation, too. By default, we will inspect the domain types's repository for binding customizations. In this example, it looks like this: +As you can see `Predicate` can be used as Spring MVC controller argument. It will automatically populate such a `Predicate` with values from the current request based on the type configured in `@QuerydslPredicate`. Explicit bindings can be configured by either explicitly defining one in the annotation, too. By default, we will inspect the domain types's repository for binding customizations. In this example, it looks like this: ```java public interface UserRepository @@ -45,7 +45,7 @@ public interface UserRepository } ``` -The repository extends `QuerydslBinderCustomizer` which exposes a `QuerydslBindings` instance for customization. It allows for property based (by using Querydsl's meta-model types) and type based customizations of the value binding. The example here defines a `String`-properties to be bound using the `containsIgnoreCase(…)` operator. For further information checkout the JavaDoc of [QuerydslBindings](http://docs.spring.io/spring-data/commons/docs/1.11.0.RC1/api/org/springframework/data/querydsl/binding/QuerydslBindings.html). +The repository extends `QuerydslBinderCustomizer` which exposes a `QuerydslBindings` instance for customization. It allows for property based (by using Querydsl's metamodel types) and type based customizations of the value binding. The example here defines a `String`-properties to be bound using the `containsIgnoreCase(…)` operator. For further information checkout the JavaDoc of [QuerydslBindings](http://docs.spring.io/spring-data/commons/docs/1.11.0.RC1/api/org/springframework/data/querydsl/binding/QuerydslBindings.html). ## Technologies used diff --git a/web/querydsl/src/main/resources/templates/index.html b/web/querydsl/src/main/resources/templates/index.html index 6b6bb450..6e59b3e9 100644 --- a/web/querydsl/src/main/resources/templates/index.html +++ b/web/querydsl/src/main/resources/templates/index.html @@ -79,7 +79,7 @@ Firstname Lastname - Naionality + Nationality City Street Email @@ -92,4 +92,4 @@ - \ No newline at end of file +