File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
spring-context/src/main/java/org/springframework/context/annotation Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2014 the original author or authors.
2
+ * Copyright 2002-2015 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -149,12 +149,24 @@ public static boolean isLiteConfigurationCandidate(AnnotationMetadata metadata)
149
149
if (metadata .isInterface ()) {
150
150
return false ;
151
151
}
152
+
153
+ // Any of the typical annotations found?
152
154
for (String indicator : candidateIndicators ) {
153
155
if (metadata .isAnnotated (indicator )) {
154
156
return true ;
155
157
}
156
158
}
157
- return metadata .hasAnnotatedMethods (Bean .class .getName ());
159
+
160
+ // Finally, let's look for @Bean methods...
161
+ try {
162
+ return metadata .hasAnnotatedMethods (Bean .class .getName ());
163
+ }
164
+ catch (Throwable ex ) {
165
+ if (logger .isDebugEnabled ()) {
166
+ logger .debug ("Failed to introspect @Bean methods on class [" + metadata .getClass () + "]: " + ex );
167
+ }
168
+ return false ;
169
+ }
158
170
}
159
171
160
172
/**
You can’t perform that action at this time.
0 commit comments