Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use space intents in readme #531

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,42 @@ Here is a quick teaser of an application using Spring Data Repositories in Java:
----
public interface PersonRepository extends CrudRepository<Person, Long> {

List<Person> findByLastname(String lastname);
List<Person> findByLastname(String lastname);

List<Person> findByFirstnameLike(String firstname);
List<Person> findByFirstnameLike(String firstname);
}

@Service
public class MyService {

private final PersonRepository repository;
private final PersonRepository repository;

public MyService(PersonRepository repository) {
this.repository = repository;
}
public MyService(PersonRepository repository) {
this.repository = repository;
}

public void doWork() {
public void doWork() {

repository.deleteAll();
repository.deleteAll();

Person person = new Person();
person.setFirstname("Oliver");
person.setLastname("Gierke");
repository.save(person);
Person person = new Person();
person.setFirstname("Oliver");
person.setLastname("Gierke");
repository.save(person);

List<Person> lastNameResults = repository.findByLastname("Gierke");
List<Person> firstNameResults = repository.findByFirstnameLike("Oli*");
}
List<Person> lastNameResults = repository.findByLastname("Gierke");
List<Person> firstNameResults = repository.findByFirstnameLike("Oli*");
}
}

@KeySpace("person")
class Person {

@Id String uuid;
String firstname;
String lastname;
@Id String uuid;
String firstname;
String lastname;

// getters and setters omitted for brevity
// getters and setters omitted for brevity
}

@Configuration
Expand All @@ -72,9 +72,9 @@ Add the Maven dependency:
[source,xml]
----
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-keyvalue</artifactId>
<version>${version}.RELEASE</version>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-keyvalue</artifactId>
<version>${version}.RELEASE</version>
</dependency>
----

Expand All @@ -83,15 +83,15 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
[source,xml]
----
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-keyvalue</artifactId>
<version>${version}-SNAPSHOT</version>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-keyvalue</artifactId>
<version>${version}-SNAPSHOT</version>
</dependency>

<repository>
<id>spring-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>https://repo.spring.io/snapshot</url>
<id>spring-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>https://repo.spring.io/snapshot</url>
</repository>
----

Expand Down