Skip to content

Commit

Permalink
GRAILS-11428 fix problem related to grailsApplication bean getting ov…
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed May 29, 2014
1 parent 326b463 commit 56af0ae
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -65,6 +65,17 @@ public GrailsApplicationContext(org.springframework.context.ApplicationContext p
public GrailsApplicationContext() throws org.springframework.beans.BeansException {
metaClass = GroovySystem.getMetaClassRegistry().getMetaClass(getClass());
}

@Override
public boolean containsBeanDefinition(String beanName) {
if(super.containsBeanDefinition(beanName)) {
return true;
} else if (getParent() != null && "grailsApplication".equals(beanName)) {
return getParent().containsBeanDefinition(beanName);
} else {
return false;
}
}

public MetaClass getMetaClass() {
return metaClass;
Expand Down

0 comments on commit 56af0ae

Please sign in to comment.