Commit f201464 1 parent 5f29f0a commit f201464 Copy full SHA for f201464
File tree 1 file changed +2
-1
lines changed
samples/data-jdbc/src/main/java/com/example/data/jdbc
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 22
22
import org .springframework .context .annotation .Bean ;
23
23
import org .springframework .context .annotation .Configuration ;
24
24
import org .springframework .data .domain .AuditorAware ;
25
+ import org .springframework .data .relational .core .mapping .event .BeforeConvertEvent ;
25
26
import org .springframework .data .relational .core .mapping .event .BeforeSaveEvent ;
26
27
27
28
@ Configuration
@@ -37,7 +38,7 @@ public AuditorAware<String> anonymousAuditorAware(){
37
38
@ Bean
38
39
public ApplicationListener <?> idSetting () {
39
40
40
- return (ApplicationListener <BeforeSaveEvent >) event -> {
41
+ return (ApplicationListener <BeforeConvertEvent >) event -> {
41
42
42
43
if (event .getEntity () instanceof LegoSet ) {
43
44
setIds ((LegoSet ) event .getEntity ());
You can’t perform that action at this time.
0 commit comments