spring-mvc - 蒲公英数据表出错 - 无法加载资源 : the server responded with a status of 404 (Not Found)

标签 spring-mvc datatable dandelion

我第一次安装了蒲公英数据表。我关注了this指导。我使用的是 1.0.1 版本

你能帮我解决以下错误吗:

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/css/jquery.dataTables.css

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/jquery/js/jquery.js

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/js/jquery.dataTables.js

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/features/filtering/jquery.dataTables.yadcf.js

Failed to load resource: the server responded with a status of 404 (Not Found) 

dandelion-datatables-91438756c71be2df6b2ee155197c3192.js:34

Uncaught ReferenceError: $ is not defined 

http://localhost:8080/website/dandelion/datatables/features/filtering/jquery.dataTables.yadcf.css

Failed to load resource: the server responded with a status of 404 (Not Found) 

http://localhost:8080/website/dandelion/datatables/css/jquery.dataTables.css

Failed to load resource: the server responded with a status of 404 (Not Found)

http://localhost:8080/enepath/dandelion/datatables/css/jquery.dataTables.css

最佳答案

我需要将以下内容添加到 mvc-core-config.xml 以公开蒲公英的资源:

<mvc:resources mapping="/dandelion/**" location="classpath:/META-INF/resources/dandelion/" />

关于spring-mvc - 蒲公英数据表出错 - 无法加载资源 : the server responded with a status of 404 (Not Found),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31674330/

相关文章:

java - 设置蒲公英数据表中的可见行数

forms - 避免 spring <form :input path ="var"/> for int variable 中的默认值

c# - List<object[]> 使用比 DataTable 更多的内存?

javascript - 使用 jquery 查找数据表的表格单元格的内部值

mysql - 如何将查询结果设置为可查询表?

javascript - 蒲公英数据表scrollX不起作用

java - 使用 Dandelion DataTables 创建表时出现异常

java - 获取同一事务中使用@Transactional插入的数据

java - 如何使用纯基于 Java 的配置来配置 Spring MVC?

java - 在 @RequestParam 中绑定(bind)列表包含方括号