Created
January 14, 2014 08:55
-
-
Save bodiam/8415239 to your computer and use it in GitHub Desktop.
Spring annotation configuration bean scanning
This file contains hidden or 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 | |
| @ComponentScan( | |
| value = "com.actions", | |
| includeFilters = @ComponentScan.Filter(value = ActionBean.class) | |
| ) | |
| public class ApplicationConfiguration { | |
| public static void main(String[] args) { | |
| final AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(ApplicationConfiguration.class); | |
| final OrderAction bean = annotationConfigApplicationContext.getBean(OrderAction.class); | |
| System.out.println(bean); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment