回答編集履歴
1
修正
answer
CHANGED
@@ -13,11 +13,30 @@
|
|
13
13
|
`--- /static
|
14
14
|
```
|
15
15
|
|
16
|
-
**修正
|
16
|
+
**修正後**
|
17
|
+
|
18
|
+
imagesディレクトリをstaticディレクトリの下へ移動させてください。
|
19
|
+
|
17
20
|
```
|
18
21
|
src/main/resources
|
19
22
|
|
|
20
23
|
`--- /static
|
21
24
|
|
|
22
25
|
`--- /images
|
26
|
+
```
|
27
|
+
|
28
|
+
### 2) Thymeleafのth属性の書き方
|
29
|
+
|
30
|
+
**修正前**
|
31
|
+
|
32
|
+
```
|
33
|
+
<img src="@{/images/magnifier_animal_usagi.jpg}">
|
34
|
+
```
|
35
|
+
|
36
|
+
**修正後**
|
37
|
+
|
38
|
+
Thymeleafで描画するには`th:src`のようにth属性として記述します。
|
39
|
+
|
40
|
+
```
|
41
|
+
<img src="/images/magnifier_animal_usagi.jpg" th:src="@{/images/magnifier_animal_usagi.jpg}"/>
|
23
42
|
```
|