所以,我们Jawr
在我们的Spring
项目中使用并且一切都运行良好,除了当我尝试包含这样的单个css
文件时:
<jwr:style src="/assets/css/style2.css" />
它包括css目录中的所有文件
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/non-responsive.css?d=35303629" />
<script type="text/javascript">/* The resource '/assets/css/non-responsive.css' is already included in the page. */</script>
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style1.css?d=48250928" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style2.css?d=444574087" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style3.css?d=68336060" />
<script type="text/javascript">/* The resource '/assets/css/style3.css' is already included in the page. */</script>
<script type="text/javascript">/* Finished adding members resolved by /assets/css/style2.css */</script>
<script type="text/javascript">/* Start adding members resolved by '/assets/js/summary.js'. Bundle id is: '/assets/js/summary.js' */</script>
<script type="text/javascript" src="/assets/js/summary.js?d=82086305" ></script>
<script type="text/javascript">/* Finished adding members resolved by /assets/js/summary.js */</script>
这适用于最后两行所示的单个 JS 文件,但由于某种原因不适用于 CSS 文件。我是否遗漏了什么,或者我应该以传统方式包含文件?