This commit is contained in:
Phillip Webb
2016-02-19 15:54:59 -08:00
parent 03dad33b0c
commit 4b55144d80
32 changed files with 158 additions and 105 deletions

View File

@@ -37,7 +37,6 @@ public class SampleCouchbaseApplication implements CommandLineRunner {
public void run(String... args) throws Exception {
this.userRepository.deleteAll();
User user = saveUser();
System.out.println(this.userRepository.findOne(user.getId()));
}
@@ -46,7 +45,6 @@ public class SampleCouchbaseApplication implements CommandLineRunner {
user.setId(UUID.randomUUID().toString());
user.setFirstName("Alice");
user.setLastName("Smith");
return this.userRepository.save(user);
}

View File

@@ -16,9 +16,9 @@
package sample.data.couchbase;
import com.couchbase.client.java.repository.annotation.Field;
import com.couchbase.client.java.repository.annotation.Id;
import org.springframework.data.couchbase.core.mapping.Document;
@Document
@@ -59,10 +59,8 @@ public class User {
@Override
public String toString() {
return "User{" +
"id='" + this.id + '\'' +
", firstName='" + this.firstName + '\'' +
", lastName='" + this.lastName + '\'' +
'}';
return "User{" + "id='" + this.id + '\'' + ", firstName='" + this.firstName + '\''
+ ", lastName='" + this.lastName + '\'' + '}';
}
}