私のディレクトリ構造があるthymeleaf:静的リソースのどれも与えて404エラー
ディレクトリ構造
src/
main/
resources/
static/
CSS/
JS/
images/
template/
fragments/
header.html
footer.html
navBar.html
layouts/
appLayout.html
baseLayout.html
welcome.html
appLayout.htmlは
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
<link rel="stylesheet" type="text/css" media="screen, projection"
href="/static/css/bootstrap.css"
th:href="@{/bootstrap.min.css}" />
<link rel="stylesheet" type="text/css" media="screen, projection"
href="/static/css/bootstrap.css"
th:href="@{/css/bootstrap.min.css}" />
<link rel="stylesheet" type="text/css" media="screen, projection"
href="/static/css/bootstrap.css"
th:href="@{css/bootstrap.min.css}" />
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap.min.css"
th:href="@{/webjars/bootstrap/2.3.0/css/bootstrap.min.css}" rel="stylesheet" />
</head>
<body>
<div th:replace="/fragments/header :: header"></div>
<div th:replace="/fragments/navbar :: navbar"></div>
<div class="container">
<div layout:fragment="content">
<p>Content goes here...</p>
</div>
<footer>
<div th:replace="/fragments/footer :: footer"></div>
</footer>
</div>
</body>
</html>
で<links>
タグをチェックしないでください上記のレイアウトでは、リンクタグに異なる場所を使用していますが、いずれもgiv 404 error
なぜそうですか?
上の画像を見てください、私はリソース/静的/ CSS /フォルダ内のCSSやJSファイルを持っているとJSが間違って何が起こっているかint型/リソース/静的/のJS /フォルダのですか?いくつかの静的リソースでChromeが404エラーを表示しないのはなぜですか?
TD; LR静的リソースは、私のthymeleafレイアウトにロードされていないが
エラーが発生する特定の例を挙げることができますか? – benkuly
'bootstrap.min.css'は' static/css/'にあるので、他のリンクされたリソースはchrome devtoolで404エラーを表示するはずです。 – piechuckerr
カスタムリソースハンドラを追加しましたか? – benkuly