Spring引导和Thymeleaf资源文件夹问题

Spring引导和Thymeleaf资源文件夹问题,spring,spring-boot,thymeleaf,Spring,Spring Boot,Thymeleaf,我正在尝试在Spring Boot项目中设置资源文件夹。但没能做到。请帮忙。我正在尝试整合thymeleaf 我可以得到index.html 但我无法在index.html中包含resource/css/mobile-angular-ui-desktop.min.css文件。 它给我404页找不到的错误 index.html <!DOCTYPE html> <html> <head> <title>Provision Admin</tit

我正在尝试在Spring Boot项目中设置资源文件夹。但没能做到。请帮忙。我正在尝试整合thymeleaf

我可以得到index.html 但我无法在index.html中包含resource/css/mobile-angular-ui-desktop.min.css文件。 它给我404页找不到的错误

index.html

<!DOCTYPE html>

<html>
<head>
<title>Provision Admin</title>

<link rel="stylesheet" th:href="@{/css/mobile-angular-ui-base.min.css}"
    href="../static/css/mobile-angular-ui-base.min.css" />
<link rel="stylesheet"
    href="/css/mobile-angular-ui-desktop.min.css" />

<script type="text/javascript">
    var appContext = '/profilebatch';

</script>


</head>
<body>

</body>
</html>

您没有桌面的th:href,如果您可以访问base,那么这就是您的问题:

th:href="@{/css/mobile-angular-ui-desktop.min.css}"

静态资源默认位于/public而不是/src/main/resources/Static

最后一切正常。
我在配置中删除了@EnableWebMvc。

我尝试过,但仍然存在问题。我已将ContentNegotiation deafult设置为Rest服务的应用程序_JSON。我有休息和上网。任何排除ContentNegotiationSpring Boot文件夹的想法都将在
/static
之外发挥作用。您能解释一下吗?实际呈现的HTML中的
href
是什么样子的吗?请分享更多详细信息,日志中是否有任何错误?请确认基本日志工作正常,以及桌面日志的唯一问题,请使用firebug或开发人员工具进行确认。如果base one正常工作,桌面也必须正常工作。好了,这是逻辑,我认为您正在使用@enablewebmvc并扩展WebMVCConfigureAdapter,因此您需要覆盖AddResourceHandler
th:href="@{/css/mobile-angular-ui-desktop.min.css}"