File tree Expand file tree Collapse file tree 4 files changed +28
-4
lines changed
embedded-database-spring-test/src/main/java/io/zonky/test/db Expand file tree Collapse file tree 4 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 4040import org .springframework .aop .framework .ProxyFactory ;
4141import org .springframework .aop .support .NameMatchMethodPointcutAdvisor ;
4242import org .springframework .beans .factory .config .BeanPostProcessor ;
43+ import org .springframework .core .Ordered ;
4344
4445import java .util .Arrays ;
4546import java .util .Collection ;
5960
6061import static com .google .common .base .Preconditions .checkState ;
6162
62- public class FlywayDatabaseExtension implements BeanPostProcessor {
63+ public class FlywayDatabaseExtension implements BeanPostProcessor , Ordered {
6364
6465 private static final FlywayVersion flywayVersion = FlywayClassUtils .getFlywayVersion ();
6566
@@ -68,6 +69,11 @@ public class FlywayDatabaseExtension implements BeanPostProcessor {
6869 protected final Multimap <DatabaseContext , Flyway > flywayBeans = HashMultimap .create ();
6970 protected final BlockingQueue <FlywayOperation > pendingOperations = new LinkedBlockingQueue <>();
7071
72+ @ Override
73+ public int getOrder () {
74+ return Ordered .HIGHEST_PRECEDENCE + 1 ;
75+ }
76+
7177 @ Override
7278 public Object postProcessBeforeInitialization (Object bean , String beanName ) {
7379 if (bean instanceof AopInfrastructureBean ) {
Original file line number Diff line number Diff line change 33import org .springframework .beans .BeansException ;
44import org .springframework .beans .factory .config .BeanPostProcessor ;
55import org .springframework .boot .autoconfigure .flyway .FlywayProperties ;
6+ import org .springframework .core .Ordered ;
67
7- public class FlywayPropertiesPostProcessor implements BeanPostProcessor {
8+ public class FlywayPropertiesPostProcessor implements BeanPostProcessor , Ordered {
9+
10+ @ Override
11+ public int getOrder () {
12+ return Ordered .LOWEST_PRECEDENCE - 1 ;
13+ }
814
915 @ Override
1016 public Object postProcessBeforeInitialization (Object bean , String beanName ) throws BeansException {
Original file line number Diff line number Diff line change 2828import org .springframework .aop .framework .ProxyFactory ;
2929import org .springframework .aop .support .NameMatchMethodPointcutAdvisor ;
3030import org .springframework .beans .factory .config .BeanPostProcessor ;
31+ import org .springframework .core .Ordered ;
3132
3233import static com .google .common .base .Preconditions .checkState ;
3334
34- public class LiquibaseDatabaseExtension implements BeanPostProcessor {
35+ public class LiquibaseDatabaseExtension implements BeanPostProcessor , Ordered {
36+
37+ @ Override
38+ public int getOrder () {
39+ return Ordered .HIGHEST_PRECEDENCE + 1 ;
40+ }
3541
3642 @ Override
3743 public Object postProcessBeforeInitialization (Object bean , String beanName ) {
Original file line number Diff line number Diff line change 1919import org .springframework .beans .BeansException ;
2020import org .springframework .beans .factory .config .BeanPostProcessor ;
2121import org .springframework .boot .autoconfigure .liquibase .LiquibaseProperties ;
22+ import org .springframework .core .Ordered ;
2223
23- public class LiquibasePropertiesPostProcessor implements BeanPostProcessor {
24+ public class LiquibasePropertiesPostProcessor implements BeanPostProcessor , Ordered {
25+
26+ @ Override
27+ public int getOrder () {
28+ return Ordered .LOWEST_PRECEDENCE - 1 ;
29+ }
2430
2531 @ Override
2632 public Object postProcessBeforeInitialization (Object bean , String beanName ) throws BeansException {
You can’t perform that action at this time.
0 commit comments