hello!python!

springmvc 加载静态文件失败


header.jsp,部分代码
<head>
<title>QA|VIS_PLATFORM</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />

<!-- ================== GLOBAL STYLE START ================== -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
<link href="${base}/css/bootstrap/bootstrap.css" rel="stylesheet" />
<#--<link href="${base}/css/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" />-->
<link href="${base}/css/bootstrap/font-awesome.min.css" rel="stylesheet" />
<link href="${base}/css/bootstrap/jquery-ui-1.10.1.custom.css" rel="stylesheet" />
<link href="${base}/css/bootstrap/style.min.css" rel="stylesheet" />
<link href="${base}/css/bootstrap/style-responsive.min.css" rel="stylesheet" />

加载静态文件失败。

解决方案:在mvc的配置文件中加入以下配置

<mvc:resources location="/WEB-INF/" mapping="**"></mvc:resources>
posted @ 2017-12-27 20:27  你坚持了吗  阅读(256)  评论(0编辑  收藏  举报
hello!python!