example.scannable.MessageBean Java Examples
The following examples show how to use
example.scannable.MessageBean.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ComponentScanAnnotationIntegrationTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void withMultipleAnnotationIncludeFilters1() throws IOException, ClassNotFoundException { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.register(ComponentScanWithMultipleAnnotationIncludeFilters1.class); ctx.refresh(); ctx.getBean(DefaultNamedComponent.class); // @CustomStereotype-annotated ctx.getBean(MessageBean.class); // @CustomComponent-annotated }
Example #2
Source File: ComponentScanAnnotationIntegrationTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void withMultipleAnnotationIncludeFilters2() throws IOException, ClassNotFoundException { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.register(ComponentScanWithMultipleAnnotationIncludeFilters2.class); ctx.refresh(); ctx.getBean(DefaultNamedComponent.class); // @CustomStereotype-annotated ctx.getBean(MessageBean.class); // @CustomComponent-annotated }
Example #3
Source File: ClassPathScanningCandidateComponentProviderTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void testWithClassType() { ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false); provider.addIncludeFilter(new AssignableTypeFilter(MessageBean.class)); Set<BeanDefinition> candidates = provider.findCandidateComponents(TEST_BASE_PACKAGE); assertEquals(1, candidates.size()); assertTrue(containsBeanClass(candidates, MessageBean.class)); }
Example #4
Source File: ComponentScanAnnotationIntegrationTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void withMultipleAnnotationIncludeFilters1() throws IOException, ClassNotFoundException { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.register(ComponentScanWithMultipleAnnotationIncludeFilters1.class); ctx.refresh(); ctx.getBean(DefaultNamedComponent.class); // @CustomStereotype-annotated ctx.getBean(MessageBean.class); // @CustomComponent-annotated }
Example #5
Source File: ComponentScanAnnotationIntegrationTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void withMultipleAnnotationIncludeFilters2() throws IOException, ClassNotFoundException { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.register(ComponentScanWithMultipleAnnotationIncludeFilters2.class); ctx.refresh(); ctx.getBean(DefaultNamedComponent.class); // @CustomStereotype-annotated ctx.getBean(MessageBean.class); // @CustomComponent-annotated }
Example #6
Source File: ClassPathScanningCandidateComponentProviderTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void testWithClassType() { ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false); provider.addIncludeFilter(new AssignableTypeFilter(MessageBean.class)); Set<BeanDefinition> candidates = provider.findCandidateComponents(TEST_BASE_PACKAGE); assertEquals(1, candidates.size()); assertTrue(containsBeanClass(candidates, MessageBean.class)); }
Example #7
Source File: ComponentScanAnnotationIntegrationTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void withMultipleAnnotationIncludeFilters1() throws IOException, ClassNotFoundException { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.register(ComponentScanWithMultipleAnnotationIncludeFilters1.class); ctx.refresh(); ctx.getBean(DefaultNamedComponent.class); // @CustomStereotype-annotated ctx.getBean(MessageBean.class); // @CustomComponent-annotated }
Example #8
Source File: ComponentScanAnnotationIntegrationTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void withMultipleAnnotationIncludeFilters2() throws IOException, ClassNotFoundException { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.register(ComponentScanWithMultipleAnnotationIncludeFilters2.class); ctx.refresh(); ctx.getBean(DefaultNamedComponent.class); // @CustomStereotype-annotated ctx.getBean(MessageBean.class); // @CustomComponent-annotated }
Example #9
Source File: ClassPathScanningCandidateComponentProviderTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void testWithClassType() { ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false); provider.addIncludeFilter(new AssignableTypeFilter(MessageBean.class)); Set<BeanDefinition> candidates = provider.findCandidateComponents(TEST_BASE_PACKAGE); assertEquals(1, candidates.size()); assertTrue(containsBeanClass(candidates, MessageBean.class)); }