【发布时间】:2016-08-09 09:20:27
【问题描述】:
我是 grails 的初学者。
我想向 grails 应用程序添加一些静态资源,并将它们从 url 映射中排除。
我在 UrlMappings groovy 中添加了以下行:
class UrlMappings {
static excludes = ['/resources/*']
...
但我不知道如何为应用程序和最终战争添加资源。 build.gradle 中可能有设置。
我想打开可以使用静态 js/css/images 的静态 html。
像这样:localhost:8080/resources/index.html
提前致谢
【问题讨论】:
-
谢谢! @emmanuel-rosa 好吧,我想在我的项目中使用 npm 包管理器,资源文件夹中可能有数百个 js/css/other 文件。可能有一个强大的解决方案,它只是自动将包含所有内容的文件夹添加到战争中,并静态处理其中的资源。感谢任何帮助
标签: grails grails-3.0 grails-3.1