質問編集履歴

2

実装内容一部修正、エラーメッセージ更新

2024/03/08 19:52

投稿

ganbaritai__me
ganbaritai__me

スコア1

test CHANGED
File without changes
test CHANGED
@@ -7,14 +7,13 @@
7
7
  ```ここに言語を入力
8
8
  This application has no configured error view, so you are seeing this as a fallback.
9
9
 
10
- Sat Mar 09 04:44:05 JST 2024
10
+ Sat Mar 09 04:50:44 JST 2024
11
- [a2528e56-4] There was an unexpected error (type=Internal Server Error, status=500).
11
+ [51a5dce7-6] There was an unexpected error (type=Not Found, status=404).
12
+ No static resource 01/home.html.
12
- Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers
13
+ org.springframework.web.reactive.resource.NoResourceFoundException: 404 NOT_FOUND "No static resource 01/home.html."
13
- org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers
14
- at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
14
+ at org.springframework.web.reactive.resource.ResourceWebHandler.lambda$handle$1(ResourceWebHandler.java:431)
15
15
  Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below:
16
16
  Error has been observed at the following site(s):
17
- *__checkpoint ⇢ Handler com.example.sample.controller.DemoController#home() [DispatcherHandler]
18
17
  *__checkpoint ⇢ HTTP GET "/01/home.html" [ExceptionHandlingWebHandler]
19
18
  ```
20
19
 
@@ -40,13 +39,11 @@
40
39
  return "index"; // index.html を表示
41
40
  }
42
41
 
43
- @RequestMapping("/01/home.html")
42
+ @RequestMapping("/01")
44
43
  public String home() {
45
44
  return "home"; // 01/home.html を表示
46
45
  }
47
46
  }
48
-
49
-
50
47
  ```
51
48
 
52
49
  ```/templates/index.html

1

エラーメッセージを追記

2024/03/08 19:48

投稿

ganbaritai__me
ganbaritai__me

スコア1

test CHANGED
File without changes
test CHANGED
@@ -4,6 +4,19 @@
4
4
 
5
5
  ### 発生している問題・分からないこと
6
6
  Springが指定されたパスに対応する静的ファイルを見つけられなかった旨のエラーメッセージが表示されています。
7
+ ```ここに言語を入力
8
+ This application has no configured error view, so you are seeing this as a fallback.
9
+
10
+ Sat Mar 09 04:44:05 JST 2024
11
+ [a2528e56-4] There was an unexpected error (type=Internal Server Error, status=500).
12
+ Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers
13
+ org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers
14
+ at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
15
+ Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below:
16
+ Error has been observed at the following site(s):
17
+ *__checkpoint ⇢ Handler com.example.sample.controller.DemoController#home() [DispatcherHandler]
18
+ *__checkpoint ⇢ HTTP GET "/01/home.html" [ExceptionHandlingWebHandler]
19
+ ```
7
20
 
8
21
 
9
22
 
@@ -14,7 +27,7 @@
14
27
  ```
15
28
 
16
29
  ```com/***/sample/DemoController.java
17
- package com.***.sample.controller;
30
+ package com.example.sample.controller;
18
31
 
19
32
  import org.springframework.stereotype.Controller;
20
33
  import org.springframework.web.bind.annotation.RequestMapping;
@@ -32,6 +45,7 @@
32
45
  return "home"; // 01/home.html を表示
33
46
  }
34
47
  }
48
+
35
49
 
36
50
  ```
37
51
 
@@ -51,7 +65,6 @@
51
65
  </body>
52
66
 
53
67
  </html>
54
-
55
68
  ```
56
69
 
57
70
  ### 試したこと・調べたこと