Polishing.
Formatting. Clarifying what is demonstrated a little. Original pull request #668
This commit is contained in:
@@ -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{" +
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user