From 1d604fb1da240a969106acb7a5b30b3bdddad63a Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Fri, 14 Jul 2023 17:58:00 +0800 Subject: [PATCH] Grails GSP: Fixes failed test in GrailsConventionGroovyPageLocatorSpec --- .../groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java | 4 +++- grails-web-gsp/build.gradle | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java b/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java index 9d892f54ff..4c9db10315 100644 --- a/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java +++ b/grails-gsp/src/main/groovy/org/grails/gsp/io/DefaultGroovyPageLocator.java @@ -66,6 +66,8 @@ public class DefaultGroovyPageLocator implements GroovyPageLocator, ResourceLoad private static final String PLUGINS_PATH = "/plugins/"; + private static final String GRAILS_VIEWS_PATH = "/" + BuildSettings.GRAILS_APP_PATH + "/" + "views"; + protected final Logger logger = LoggerFactory.getLogger(getClass()); protected Collection resourceLoaders = new ConcurrentLinkedQueue<>(); @@ -370,7 +372,7 @@ protected List resolveSearchPaths(String uri) { } else { searchPaths = CollectionUtils.newList( - GrailsResourceUtils.appendPiecesForUri(BuildSettings.GRAILS_APP_PATH + File.separator + "views", uri), + GrailsResourceUtils.appendPiecesForUri(GRAILS_VIEWS_PATH, uri), GrailsResourceUtils.appendPiecesForUri(PATH_TO_WEB_INF_VIEWS, uri), uri); } diff --git a/grails-web-gsp/build.gradle b/grails-web-gsp/build.gradle index bfa80166c4..77ed48fb3f 100644 --- a/grails-web-gsp/build.gradle +++ b/grails-web-gsp/build.gradle @@ -8,5 +8,6 @@ dependencies { testImplementation libs.spring.test testImplementation project(":grails-test") + testImplementation project(":grails-plugin-i18n") testRuntimeOnly project(":grails-spring") }