Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.NameMatchMethodPointcutAdvisor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.Ordered;

import java.util.Arrays;
import java.util.Collection;
Expand All @@ -59,7 +60,7 @@

import static com.google.common.base.Preconditions.checkState;

public class FlywayDatabaseExtension implements BeanPostProcessor {
public class FlywayDatabaseExtension implements BeanPostProcessor, Ordered {

private static final FlywayVersion flywayVersion = FlywayClassUtils.getFlywayVersion();

Expand All @@ -68,6 +69,11 @@ public class FlywayDatabaseExtension implements BeanPostProcessor {
protected final Multimap<DatabaseContext, Flyway> flywayBeans = HashMultimap.create();
protected final BlockingQueue<FlywayOperation> pendingOperations = new LinkedBlockingQueue<>();

@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE + 1;
}

@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) {
if (bean instanceof AopInfrastructureBean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.flyway.FlywayProperties;
import org.springframework.core.Ordered;

public class FlywayPropertiesPostProcessor implements BeanPostProcessor {
public class FlywayPropertiesPostProcessor implements BeanPostProcessor, Ordered {

@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE - 1;
}

@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.NameMatchMethodPointcutAdvisor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.Ordered;

import static com.google.common.base.Preconditions.checkState;

public class LiquibaseDatabaseExtension implements BeanPostProcessor {
public class LiquibaseDatabaseExtension implements BeanPostProcessor, Ordered {

@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE + 1;
}

@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.core.Ordered;

public class LiquibasePropertiesPostProcessor implements BeanPostProcessor {
public class LiquibasePropertiesPostProcessor implements BeanPostProcessor, Ordered {

@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE - 1;
}

@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
Expand Down
Loading