LoginSignup
0
0

Spring Boot の Web アプリを Eclipse で起動した時に「Cannot find template location:・・・」とコンソールに出力された場合の対処法

Posted at

コンソールで次の WARN が出力されました。

Cannot find template location: classpath:/templates/ (please add some templates, check your Thymeleaf configuration, or set spring.thymeleaf.check-template-location=false)

WARN は、下図の青色ハイライトの行です。

console1.png

WARN を消すための操作手順

※手順の(Hello)は、適宜読み替えてください。

  1. (Hello)プロジェクトのプロパティーを開く。
  2. ソースタブを開く。
  3. (Hello)/src/main/resources の下の[除外:**]を選択する。
  4. ボタン[除去]を押下する。
  5. ボタン[適用]を押下する。

projectProperty1.png

以上の操作手順を行うと、下図のように[除外:**]だった箇所が、[除外:なし]に変わります。

projectProperty2.png

変更の確認が済んだらプロパティー画面を閉じて、再度プロジェクトを起動します。で、下図のように WARN の行が出なければ、作業は成功です。

console2.png

投稿年月日:2023(R5).12.15
IDE:Eclipse 2022
Spring Boot Version 3.1.5

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0