Skip to content

Commit

Permalink
Fixed issue #12460 (#257)
Browse files Browse the repository at this point in the history
Use BeanClassLoaderAware, no need to set classLoader property declaratively.
  • Loading branch information
rainboyan authored Apr 12, 2022
1 parent 5495344 commit cd72ca0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,6 @@ public void setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver) {
this.jspTagLibraryResolver = jspTagLibraryResolver;
}

/**
* Sets the ClassLoader that the TemplateEngine should use to
* @param classLoader The ClassLoader to use when compilation of Groovy Pages occurs
*/
public void setClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}

/**
* Retrieves a line number matrix for the specified page that can be used
* to retrieve the actual line number within the GSP page if the line number within the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class GroovyPagesGrailsPlugin extends Plugin {

// Setup the main templateEngine used to render GSPs
groovyPagesTemplateEngine(GroovyPagesTemplateEngine) { bean ->
classLoader = ref("classLoader")
bean.lazyInit = true
groovyPageLocator = groovyPageLocator
if (enableReload) {
reloadEnabled = enableReload
Expand Down

0 comments on commit cd72ca0

Please sign in to comment.