File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
org.springframework.web/src/main/java/org/springframework/web/context/support Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 19
19
import java .io .IOException ;
20
20
21
21
import org .springframework .beans .BeansException ;
22
+ import org .springframework .beans .factory .NoSuchBeanDefinitionException ;
23
+ import org .springframework .beans .factory .config .BeanDefinition ;
24
+ import org .springframework .beans .factory .support .DefaultBeanNameGenerator ;
22
25
import org .springframework .beans .factory .support .DefaultListableBeanFactory ;
26
+ import org .springframework .context .annotation .AnnotationConfigUtils ;
23
27
import org .springframework .context .annotation .Configuration ;
24
28
import org .springframework .context .annotation .ConfigurationClassApplicationContext ;
25
- import org .springframework .core .annotation .AnnotationUtils ;
29
+ import org .springframework .context .annotation .ConfigurationClassPostProcessor ;
26
30
import org .springframework .util .Assert ;
27
31
import org .springframework .util .ClassUtils ;
28
32
@@ -88,9 +92,6 @@ protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory)
88
92
for (String configLocation : getConfigLocations ()) {
89
93
try {
90
94
Class <?> configClass = ClassUtils .getDefaultClassLoader ().loadClass (configLocation );
91
- if (AnnotationUtils .findAnnotation (configClass , Configuration .class ) == null ) {
92
- throw new IllegalArgumentException ("Class [" + configClass .getName () + "] is not annotated with @Configuration" );
93
- }
94
95
this .delegate .addConfigurationClass (configClass );
95
96
} catch (ClassNotFoundException ex ) {
96
97
throw new IOException ("Could not load @Configuration class [" + configLocation + "]" , ex );
You can’t perform that action at this time.
0 commit comments