Permalink
Browse files

More caching

  • Loading branch information...
1 parent de74bbd commit 46476a36df491b2aeec8ecdd6c9df8ca5690efb7 @krosenvold committed Oct 14, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/main/java/org/rosenvold/spring/convention/ConventionBeanFactory.java
@@ -239,6 +239,15 @@ public synchronized BeanDefinition getBeanDefinition(String beanName) throws NoS
final Class<?> resolvedType = getResolvedType(beanName);
return getOrCreateBeanDefinition(beanName, resolvedType);
}
+
+ protected Class predictBeanType(String beanName, RootBeanDefinition mbd, Class... typesToMatch) {
+ final Class<?> resolvedType = getResolvedType(beanName);
+ if (resolvedType != null) return resolvedType;
+
+ return super.predictBeanType( beanName, mbd, typesToMatch);
+ }
+
+
private void setupConventionBeanIfMissing(String name) {
if (!super.containsBeanDefinition(name)) {

0 comments on commit 46476a3

Please sign in to comment.