【发布时间】:2013-02-01 05:26:54
【问题描述】:
我在使用 Google Appengine 和 Spring mvc 资源映射时遇到了一个奇怪的问题
这是我的spring mvc资源映射xml内容
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
<mvc:resources mapping="/images/**" location="/META-INF/static/images/" />
<mvc:resources mapping="/css/**" location="/META-INF/static/css/" />
在我的模板文件中,我将我的 css 文件引用为
<link href="/css/mystyle.css" type="text/css" rel="stylesheet" />
mystyle.css 位于 war 文件夹中的 /META-INF/static/css/mystyle.css 中。
现在的问题是在运行应用程序时,我收到带有警告的 NumberFormatException
警告:/css/mystyle.css
并且 css 无法加载,但奇怪的是当我再次刷新时,它有时会正常工作而没有异常和警告,有时却不会。
当我在 GAE 之外运行应用程序时,这个问题不存在,即我在 tomcat 服务器上运行,它很好。
【问题讨论】:
标签: google-app-engine spring-mvc