How to change order of callbacks in spring data jdbc? Primary, order, dependsOn used, didn't help.
@Bean
AfterDeleteCallback<? extends Document> test() {
return (document) -> {
log.info("test");
return document;
};
}
@Bean
AfterDeleteCallback<? extends Document> test1() {
return (document) -> {
log.info("test1");
return document;
};
}
Example with Order annotation:
@Bean
@Order(2)
AfterDeleteCallback<? extends Document> test() {
return (document) -> {
log.info("test");
return document;
};
}
@Bean
@Order(1)
AfterDeleteCallback<? extends Document> test1() {
return (document) -> {
log.info("test1");
return document;
};
}
And if I do the opposite (order(1) to test method and order(2) to test1 method, the result will be the same.
@Bean
@Order(1)
AfterDeleteCallback<? extends Document> test() {
return (document) -> {
log.info("test");
return document;
};
}
@Bean
@Order(2)
AfterDeleteCallback<? extends Document> test1() {
return (document) -> {
log.info("test1");
return document;
};
}