From 6d4aa2de4ceba9318e622b8f03dba0a1890255c5 Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Tue, 7 Jan 2025 16:32:02 +0800 Subject: [PATCH] Bean `jspTagLibraryResolver` is created only if JSTL exists Closes gh-888 --- grace-plugin-gsp/build.gradle | 2 +- .../org/grails/plugins/web/GroovyPagesAutoConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grace-plugin-gsp/build.gradle b/grace-plugin-gsp/build.gradle index c2f2ec3836..962b67aec5 100644 --- a/grace-plugin-gsp/build.gradle +++ b/grace-plugin-gsp/build.gradle @@ -8,7 +8,7 @@ dependencies { api project(":grace-web-mvc") api project(":grace-web-url-mappings") api project(":grace-web-gsp-taglib") - runtimeOnly(project(":grace-web-jsp")) + api project(":grace-web-jsp") api libs.spring.boot.autoconfigure annotationProcessor libs.spring.boot.autoconfigureProcessor annotationProcessor libs.spring.boot.configurationProcessor diff --git a/grace-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java b/grace-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java index 88a5b67d54..245a88d1e7 100644 --- a/grace-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java +++ b/grace-plugin-gsp/src/main/groovy/org/grails/plugins/web/GroovyPagesAutoConfiguration.java @@ -209,7 +209,7 @@ public ServletRegistrationBean groovyPagesServlet() { } @Bean - @ConditionalOnClass(name = "org.grails.gsp.jsp.TagLibraryResolverImpl") + @ConditionalOnClass(name = "jakarta.servlet.jsp.jstl.core.Config") public TagLibraryResolver jspTagLibraryResolver(GroovyPagesProperties groovyPagesProperties, ObjectProvider grailsApplicationObjectProvider) { TagLibraryResolverImpl tagLibraryResolver = new TagLibraryResolverImpl();