Polishing.

Formatting.
Clarifying what is demonstrated a little.

Original pull request #668
This commit is contained in:
Jens Schauder
2024-12-17 13:12:25 +01:00
parent d9c0a0f088
commit 56aafe1057
2 changed files with 6 additions and 2 deletions

View File

@@ -22,10 +22,13 @@ import jakarta.persistence.Id;
@Entity @Entity
public class Customer { public class Customer {
@Id @GeneratedValue Long id; @Id
@GeneratedValue
Long id;
String firstname; String firstname;
String lastname; String lastname;
@Override @Override
public String toString() { public String toString() {
return "Customer{" + return "Customer{" +

View File

@@ -30,12 +30,13 @@ class InterceptorIntegrationTest {
@Autowired CustomerRepository repository; @Autowired CustomerRepository repository;
@Test @Test
void foo() { void demonstrateInterceptor() {
var customer = new Customer(); var customer = new Customer();
customer.firstname = "Dave"; customer.firstname = "Dave";
customer.lastname = "Matthews"; customer.lastname = "Matthews";
// observer Log output from ApplicationConfiguration.interceptor
repository.save(customer); repository.save(customer);
} }
} }