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

Commit

Permalink
Support gsp in the 'app/views/'
Browse files Browse the repository at this point in the history
Related commit 7ceb97e
  • Loading branch information
rainboyan committed Sep 28, 2022
1 parent bedf347 commit fbf1bd1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ protected String removeViewLocationPrefixes(String uri) {
uri = removePrefix(uri, GrailsResourceUtils.WEB_INF);
uri = removePrefix(uri, SLASHED_VIEWS_DIR_PATH);
uri = removePrefix(uri, GrailsResourceUtils.VIEWS_DIR_PATH);
uri = removePrefix(uri, "app/views/");
return uri;
}

Expand Down Expand Up @@ -358,19 +359,24 @@ protected List<String> resolveSearchPaths(String uri) {
searchPaths = CollectionUtils.newList(
GrailsResourceUtils.appendPiecesForUri(GrailsResourceUtils.WEB_INF, PLUGINS_PATH,
pathInfo.pluginName, GrailsResourceUtils.VIEWS_DIR_PATH, pathInfo.path),
GrailsResourceUtils.appendPiecesForUri(GrailsResourceUtils.WEB_INF, PLUGINS_PATH,
pathInfo.pluginName, "app/views/", pathInfo.path),
GrailsResourceUtils.appendPiecesForUri(GrailsResourceUtils.WEB_INF, uri),
uri);
}
else {
searchPaths = CollectionUtils.newList(
GrailsResourceUtils.appendPiecesForUri(PATH_TO_WEB_INF_VIEWS, uri),
GrailsResourceUtils.appendPiecesForUri("/WEB-INF/app/views", uri),
uri);
}
}
else {
searchPaths = CollectionUtils.newList(
GrailsResourceUtils.appendPiecesForUri(SLASHED_VIEWS_DIR_PATH, uri),
GrailsResourceUtils.appendPiecesForUri(PATH_TO_WEB_INF_VIEWS, uri),
GrailsResourceUtils.appendPiecesForUri("/app/views/", uri),
GrailsResourceUtils.appendPiecesForUri("/WEB-INF/app/views", uri),
uri);
}
return searchPaths;
Expand Down

0 comments on commit fbf1bd1

Please sign in to comment.