Grails 类路径
Grails classpath
我有带有 web.xml(src/templates/war/web.xml)
的 Grails 应用程序,我需要在那里导入 applicationContext.xml(WEB-INF/applicationContext.xml)
。那些由 Grails 创建的文件,我想使用它们,但我无法使用 classpath:WEB-INF/applicationContext.xml
.
将 applicationContext.xml 导入 web.xml
我需要这样的东西
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/web-app/WEB-INF/applicationContext.xml</param-value>
</context-param>
在我的 web.xml 文件中,但 Grails 应用程序类路径不这样做。
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:web-app/WEB-INF/applicationContext.xml</param-value>
</context-param>
Grails 使用这种方法。
我有带有 web.xml(src/templates/war/web.xml)
的 Grails 应用程序,我需要在那里导入 applicationContext.xml(WEB-INF/applicationContext.xml)
。那些由 Grails 创建的文件,我想使用它们,但我无法使用 classpath:WEB-INF/applicationContext.xml
.
我需要这样的东西
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/web-app/WEB-INF/applicationContext.xml</param-value>
</context-param>
在我的 web.xml 文件中,但 Grails 应用程序类路径不这样做。
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:web-app/WEB-INF/applicationContext.xml</param-value>
</context-param>
Grails 使用这种方法。