Fix typos in documentations.

Fix typos in READMEs, javadoc, comments and code.

Original pull request #642
This commit is contained in:
Marc Wrobel
2022-07-18 16:43:44 +02:00
committed by Jens Schauder
parent 1aec184ff0
commit ce994f9ea0
57 changed files with 83 additions and 83 deletions

View File

@@ -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
*/

View File

@@ -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
*/

View File

@@ -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).

View File

@@ -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".
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".

View File

@@ -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

View File

@@ -82,7 +82,7 @@ public class Role implements Comparable<Role>, Iterable<ResourcePermission>, 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<Role>, Iterable<ResourcePermission>, 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<ResourcePermission> permissions) {
public Role withPermissions(Iterable<ResourcePermission> permissions) {
this.permissions.addAll((Collection<? extends ResourcePermission>) permissions);
return this;
}

View File

@@ -79,7 +79,7 @@ public class User implements Comparable<User>, 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
*/

View File

@@ -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() {

View File

@@ -15,7 +15,7 @@
<name>Spring Data JDBC - How to model bidirectional relationships between aggregates</name>
<description>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</description>
It serves as a source code repository for a How-To article on the Spring Blog</description>
<url>https://projects.spring.io/spring-data-jdbc</url>
<inceptionYear>2021</inceptionYear>
</project>
</project>

View File

@@ -15,7 +15,7 @@
<name>Spring Data JDBC - How to model aggregate internal bidirectional relationships</name>
<description>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</description>
It serves as a source code repository for a How-To article on the Spring Blog</description>
<url>https://projects.spring.io/spring-data-jdbc</url>
<inceptionYear>2021</inceptionYear>
</project>
</project>

View File

@@ -13,7 +13,7 @@
<name>Spring Data JDBC - How to ID generation</name>
<description>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</description>
It serves as a source code repository for a How-To article on the Spring Blog</description>
<url>https://projects.spring.io/spring-data-jdbc</url>
<inceptionYear>2021</inceptionYear>

View File

@@ -84,7 +84,7 @@ class Application {
@Override
public <T> T mapRow(RelationalPersistentEntity<T> 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<T> implementationEntity = getImplementationEntity(mappingContext, entity);
return super.mapRow(implementationEntity, resultSet, key);
}
@@ -93,7 +93,7 @@ class Application {
public <T> 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,

View File

@@ -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.

View File

@@ -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

View File

@@ -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:
*
* <pre>
* EntityManager em = ... // Obtain EntityManager

View File

@@ -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.
* <p>
* As you need to hand the instance a {@link javax.sql.DataSource} or

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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<User, Long> {
// 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<Subscription,Long> {
@Query(nativeQuery = true)
List<SubscriptionSummary> findAllSubscriptionSummaries();
}
```
```

View File

@@ -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

View File

@@ -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.
* <p>
* 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

View File

@@ -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

View File

@@ -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

View File

@@ -33,7 +33,7 @@ interface SecureBusinessObjectRepository extends Repository<BusinessObject, Long
* information provided by the Spring Security Context. The Spring Data Repository infrastructure will translate the
* given query string into the parameterized form: <code>
* select o from BusinessObject o where o.owner.emailAddress like ?
* </code> and set the the result SpEL expression evaluated at method invocation time as parameter value.
* </code> and set the result SpEL expression evaluated at method invocation time as parameter value.
*
* @return
*/
@@ -41,7 +41,7 @@ interface SecureBusinessObjectRepository extends Repository<BusinessObject, Long
List<BusinessObject> 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<BusinessObject, Long
*/
@Modifying(clearAutomatically = true)
@Query("update BusinessObject b set b.data = upper(b.data), b.lastModifiedBy = :#{#security.principal}, b.lastModifiedDate = :#{new java.util.Date()}")
void modifiyDataWithRecordingSecurityContext();
void modifyDataWithRecordingSecurityContext();
}

View File

@@ -122,7 +122,7 @@ class SecurityIntegrationTests {
SecurityContextHolder.getContext().setAuthentication(adminAuth);
secureBusinessObjectRepository.modifiyDataWithRecordingSecurityContext();
secureBusinessObjectRepository.modifyDataWithRecordingSecurityContext();
for (var bo : businessObjectRepository.findAll()) {

View File

@@ -19,7 +19,7 @@
4. Explain general proxy mechanism, SimpleJpaRepository
-------------------------------------------------
- show JpaRepository interface
- findAll(Pageable pageble)
- findAll(Pageable pageable)
3. CustomerRepository
---------------------
@@ -59,4 +59,4 @@
-----------------------
- show auditing test from Hades sample project
10. Back to slide deck
10. Back to slide deck

View File

@@ -12,4 +12,4 @@ public interface PersonRepository extends CrudRepository<Person, Name> {
}
```
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.

View File

@@ -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

View File

@@ -42,7 +42,7 @@ public interface CustomerRepository extends CrudRepository<Customer, String> {
List<Customer> 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

View File

@@ -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);
};
}

View File

@@ -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() {

View File

@@ -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

View File

@@ -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 -> {

View File

@@ -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

View File

@@ -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

View File

@@ -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
*/

View File

@@ -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)));

View File

@@ -55,7 +55,7 @@ class TextSearchRepositoryTests {
/**
* Show how to do simple matching. <br />
* 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() {

View File

@@ -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

View File

@@ -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:

View File

@@ -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).

View File

@@ -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

View File

@@ -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.

View File

@@ -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;

View File

@@ -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);

View File

@@ -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");

View File

@@ -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

View File

@@ -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() {

View File

@@ -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

View File

@@ -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

View File

@@ -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]
----

View File

@@ -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.

View File

@@ -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}.
*

View File

@@ -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.

View File

@@ -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

View File

@@ -79,7 +79,7 @@
</td>
<td th:text="${user.firstname}">Firstname</td>
<td th:text="${user.lastname}">Lastname</td>
<td th:text="${user.nationality}">Naionality</td>
<td th:text="${user.nationality}">Nationality</td>
<td th:text="${user.address.city}">City</td>
<td th:text="${user.address.street}">Street</td>
<td th:text="${user.email}">Email</td>
@@ -92,4 +92,4 @@
</div>
</body>
</html>
</html>