Fix typos in documentations.
Fix typos in READMEs, javadoc, comments and code. Original pull request #642
This commit is contained in:
committed by
Jens Schauder
parent
1aec184ff0
commit
ce994f9ea0
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class SecurityIntegrationTests {
|
||||
|
||||
SecurityContextHolder.getContext().setAuthentication(adminAuth);
|
||||
|
||||
secureBusinessObjectRepository.modifiyDataWithRecordingSecurityContext();
|
||||
secureBusinessObjectRepository.modifyDataWithRecordingSecurityContext();
|
||||
|
||||
for (var bo : businessObjectRepository.findAll()) {
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user