Disabling Spring Integration

Is there any way (even using Cocoon) to completely disable the liquibase Spring bean?


We want to use the Spring/liquibase pattern for development and testing for now, but it will currrently not be used for production deployment.


I’d like to be able to easily remove/disable the bean based upon some externalized configuration.


If we leave it in there “as is”, it generates an exception and fails to start our EAR because the datasource is not correct.

Assuming that all of your test cases which use beans from the application context extend on of the spring base classes (like AbstractJUnit4SpringContextTest), it is fairly simple.  Your test cases should reference a test application context which can include your production application context.  The liquibase bean would only be defined in the test application context.