Polish
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 + '\'' + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user