File tree 2 files changed +6
-2
lines changed
main/java/example/springdata/jpa/interceptors
test/java/example/springdata/jpa/interceptors
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 22
22
@ Entity
23
23
public class Customer {
24
24
25
- @ Id @ GeneratedValue Long id ;
25
+ @ Id
26
+ @ GeneratedValue
27
+ Long id ;
26
28
27
29
String firstname ;
28
30
String lastname ;
31
+
29
32
@ Override
30
33
public String toString () {
31
34
return "Customer{" +
Original file line number Diff line number Diff line change @@ -30,12 +30,13 @@ class InterceptorIntegrationTest {
30
30
@ Autowired CustomerRepository repository ;
31
31
32
32
@ Test
33
- void foo () {
33
+ void demonstrateInterceptor () {
34
34
35
35
var customer = new Customer ();
36
36
customer .firstname = "Dave" ;
37
37
customer .lastname = "Matthews" ;
38
38
39
+ // observer Log output from ApplicationConfiguration.interceptor
39
40
repository .save (customer );
40
41
}
41
42
}
You can’t perform that action at this time.
0 commit comments