Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Loading TagInvocationContextCustomizer in setApplicationContext method
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Feb 18, 2023
1 parent 3824c94 commit a29e329
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ else if (!this.classLoader.getClass().equals(GroovyPageClassLoader.class)) {
if (!Environment.isDevelopmentMode()) {
this.cachedDomainsWithoutPackage = createDomainClassMap();
}
this.tagInvocationContextCustomizers = GrailsFactoriesLoader.loadFactories(TagInvocationContextCustomizer.class,
getClass().getClassLoader());
this.tagInvocationContextCustomizers.addAll(this.grailsApplication.getMainContext()
.getBeansOfType(TagInvocationContextCustomizer.class).values());
}

private GroovyClassLoader initGroovyClassLoader(ClassLoader parent) {
Expand Down Expand Up @@ -717,6 +713,11 @@ public void setApplicationContext(ApplicationContext applicationContext) throws
Config config = this.grailsApplication.getConfig();
this.gspEncoding = config.getProperty(GroovyPageParser.CONFIG_PROPERTY_GSP_ENCODING,
System.getProperty("file.encoding", GroovyPageParser.DEFAULT_ENCODING));

this.tagInvocationContextCustomizers = GrailsFactoriesLoader.loadFactories(TagInvocationContextCustomizer.class,
getClass().getClassLoader());
this.tagInvocationContextCustomizers.addAll(this.grailsApplication.getMainContext()
.getBeansOfType(TagInvocationContextCustomizer.class).values());
}
}

Expand Down

0 comments on commit a29e329

Please sign in to comment.