在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Java/ Thymeleaf 模板引擎500狀態(tài)要怎么解決呢

Thymeleaf 模板引擎500狀態(tài)要怎么解決呢

需求:訪問 http://localhost:8080/templates/hello 的時候,訪問到 hello.html

package com.guet;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/templates")
public class TemplatesController {
    @RequestMapping("/hello")
    public String hello(){
        return "hello";
    }

}

下面是瀏覽器報錯:

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

Sun Apr 29 18:49:49 CST 2018
There was an unexpected error (type=Internal Server Error, status=500).
Circular view path [hello]: would dispatch back to the current handler URL [/templates/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

圖片:
圖片描述

圖片描述

回答
編輯回答
離殤

可能是 devtool 熱部署不支持resource文件夾更新,我重啟服務(wù)器就好了。

2017年9月21日 19:45