继续我的春天启动的应用程序接收一个白色的标签错误?

问题描述 投票:0回答:1

这是我的控制器类

 import org.springframework.stereotype.Controller;
 Import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class Place {


@RequestMapping(value="/chooseaplace")
public String place(Model model) {
    model.addAttribute("choose","place");
    return "place";

}}

什么是我已经整理出来4小时,但还是失败了错误?

when I run my application what happens is I get a message like this 

白色标签错误页面

此应用程序对/错误没有明确的映射,所以你看到这个作为后备。

星期二2月5日14时24分21秒GMT 2019时发生意外的错误(类型=未找到,状态= 404)。无消息

我想在页面中显示一个简单的消息,但它不会工作?

java spring-boot spring-mvc gradle
1个回答
0
投票

看起来你没有在地方春天将寻找资源的资源place.html。

请确认您有在的src /主/资源/在打包的战争静态或SRC /主/资源/ public目录资源。

© www.soinside.com 2019 - 2024. All rights reserved.