@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -101,6 +101,7 @@ public class ConfigurationClassPostConstructAndAutowiringTests {
|
||||
|
||||
@Configuration
|
||||
static class Config2 {
|
||||
|
||||
TestBean testBean;
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -46,7 +46,6 @@ public class ImportBeanDefinitionRegistrarTests {
|
||||
|
||||
@Test
|
||||
public void shouldInvokeAwareMethodsInImportBeanDefinitionRegistrar() {
|
||||
|
||||
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Config.class);
|
||||
context.getBean(MessageSource.class);
|
||||
|
||||
@@ -55,19 +54,20 @@ public class ImportBeanDefinitionRegistrarTests {
|
||||
assertThat(SampleRegistrar.resourceLoader, is(notNullValue()));
|
||||
}
|
||||
|
||||
|
||||
@Sample
|
||||
@Configuration
|
||||
static class Config {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Import(SampleRegistrar.class)
|
||||
public static @interface Sample {
|
||||
|
||||
}
|
||||
|
||||
|
||||
static class SampleRegistrar implements ImportBeanDefinitionRegistrar, BeanClassLoaderAware, ResourceLoaderAware,
|
||||
BeanFactoryAware {
|
||||
|
||||
@@ -94,4 +94,5 @@ public class ImportBeanDefinitionRegistrarTests {
|
||||
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user