2016-03-26 11 views
1

私は春のブートチュートリアルのいくつかを試行しようとしています。 私はeclipseでこれをインポートしました:https://spring.io/guides/gs/securing-web/スプリングブートでWebアプリケーションをセキュアにする - タイムリーフ例外を引き起こす

「安全でないWebアプリケーションを作成する」ステップで、Eclipseで起動しました。これは、[OK]を開始し、その後、私は私のブラウザでhttp://localhost:8080を開き、私は次のエラーを取得する:

Whitelabel Error Page 

This application has no explicit mapping for /error, so you are seeing this as a fallback. 

Sat Mar 26 15:15:03 GMT 2016 
There was an unexpected error (type=Internal Server Error, status=500). 
Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers 

私は、Eclipseのコンソールで次のエラーを見ることができます:

2016-03-26 15:15:03.598 ERROR 4464 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine    : [THYMELEAF][http-nio-8080-exec-1] Exception processing template "home": Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers 
2016-03-26 15:15:03.629 ERROR 4464 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause 

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "home", template might not exist or might not be accessible by any of the configured Template Resolvers 
    at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE] 
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE] 

スタックトレースがありますもっと長く、必要ならば私はそれを提供することができます。これ以外

、私は(この例では、最初のディレクトリ内にある)初期状態からのチュートリアルのソースコード

任意のアイデアを変更しませんでしたか?

答えて

1

エラーエラー解決テンプレートhomeは、ビューリゾルバがこのパスに一致するテンプレートを検出できなかったことを意味します。

SpringブートスターターThymeleafは、デフォルトのビューリゾルバを設定します。このリゾルバは、htmlファイルを次の場所に見つけます:src/main/resources/templates/。その場所にhome.htmlがあることを確認してください。そうであれば、私たちに送った例外の前に例外が発生していないかどうかを確認してください。

よろしくお願いします。 ダニエル

関連する問題