【发布时间】:2018-11-15 02:06:12
【问题描述】:
Folder hierarchy
Browser console log
安全上下文:
<intercept-url pattern="/resources/**" access="permitAll" />
弹簧上下文:
<mvc:resources location="/resources/" mapping="/resources/**" />
在jsp中导入css文件:
<link rel="stylesheet" type="text/css" href="<c:url value="/resources/style.css" />">
我不知道出了什么问题...提前感谢您的回答。
【问题讨论】:
-
摆脱
c:url的东西,制作类似href="/resources/style.css" /> -
首先,您应该在添加到html之前从url检查文件css。第二。我有一个问题要问你,为什么在链接导入 css 文件中,你使用
href="<c:url value="/resources/style.css" />"而不是href="resources/style.css" />" -
在春季环境中,我希望您将文件 css 保存在文件夹中:
src/main/webapp/resources/cssfile.css而不是src/main/resources -
你可以试试这样:跨度>
-
如图link
标签: java spring-mvc spring-security