Created
August 27, 2012 19:06
-
-
Save sveinung/3491380 to your computer and use it in GitHub Desktop.
Feature toggle example: Spring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class ToggledBeans { | |
@Bean | |
public Repository bean() { | |
return featureX.isActive() ? new JDBCRepository() : new HibernateRepository(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment