Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring项目无法从jquery ui读取图标_Jquery_Spring_Jquery Ui - Fatal编程技术网

Spring项目无法从jquery ui读取图标

Spring项目无法从jquery ui读取图标,jquery,spring,jquery-ui,Jquery,Spring,Jquery Ui,在我的spring项目中,使用Eclipse中的模板动态Web项目,我使用引导和jQueryUI来创建视图。我将两者都放在项目的WebContent文件夹中 我通过以下方式包含此库中的必要文件: <!-- Bootstrap core CSS --> <link href="<c:out value="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css"/>" rel="stylesh

在我的spring项目中,使用Eclipse中的模板动态Web项目,我使用引导和jQueryUI来创建视图。我将两者都放在项目的WebContent文件夹中

我通过以下方式包含此库中的必要文件:

<!-- Bootstrap core CSS -->
<link href="<c:out value="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css"/>" rel="stylesheet">
<link href="<c:out value="${pageContext.request.contextPath}/bootstrap/css/bootstrap-theme.min.css"/>" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="<c:out value="${pageContext.request.contextPath}/jquery/css/bootstrap/jquery-ui-1.10.4.custom.min.css"/>" rel="stylesheet">

<link href="<c:out value="${pageContext.request.contextPath}/extras/css/starter-template.css"/>" rel="stylesheet">
<link href="<c:out value="${pageContext.request.contextPath}/extras/css/grid.css"/>" rel="stylesheet">
<link href="<c:out value="${pageContext.request.contextPath}/extras/css/signin.css"/>" rel="stylesheet">
<link href="<c:out value="${pageContext.request.contextPath}/extras/css/table.css"/>" rel="stylesheet">
<link href="<c:out value="${pageContext.request.contextPath}/extras/css/responsible_table.css"/>" rel="stylesheet">
<link href="<c:out value="${pageContext.request.contextPath}/extras/css/style.css"/>" rel="stylesheet">

<link href="${pageContext.request.contextPath}/extras/css/normalize.css" rel="stylesheet" type="text/css"/>
<link href="${pageContext.request.contextPath}/extras/css/datepicker.css" rel="stylesheet" type="text/css"/>
<link href="${pageContext.request.contextPath}/extras/css/jquery-ui-timepicker-addon.min.css" rel="stylesheet" type="text/css"/>
@EnableWebMvc
@EnableTransactionManagement(mode=AdviceMode.PROXY, proxyTargetClass=true)
@ComponentScan(value="com.horariolivre")
@Configuration
public class WebAppConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/bootstrap/**").addResourceLocations("/bootstrap/").setCachePeriod(31556926);
        registry.addResourceHandler("/extras/**").addResourceLocations("/extras/").setCachePeriod(31556926);
        registry.addResourceHandler("/jquery/**").addResourceLocations("/jquery/").setCachePeriod(31556926);
    }

    @Override
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    }

}
这部分工作正常,因为WebApp无法从jqueryui读取图标,导致我在视图中使用的一些小部件(如jqueryui对话框)的显示出现故障,无法正确显示关闭按钮


有人知道为什么会发生这种情况以及如何解决吗?

我希望这是你的项目::

问题是:

<!-- Custom styles for this template --><link href="<c:out value="${pageContext.request.contextPath}/jquery/css/bootstrap/jquery-ui-1.10.4.custom.min.css"/>" rel="stylesheet">
应该是——

value="${pageContext.request.contextPath}/jquery/css/ui-lignhtess/jquery-ui-1.10.4.custom.min.css"

万一它滑倒了,您还引用了同一样式表的开发版本和缩小版本。

我刚刚检查了您的github,说实话,我不知道。如果jQuery正在加载而图像没有出现,很可能是:路径问题-在CSS指定的位置找不到图像;或者b服务器出现问题,由于htaccess或其他原因,无法提供图像。建议:在标准目录结构中实现jQuery,看看它是否有效。
value="${pageContext.request.contextPath}/jquery/css/ui-lignhtess/jquery-ui-1.10.4.custom.min.css"