美文网首页
springboot项目浏览器报错:There was an u

springboot项目浏览器报错:There was an u

作者: 爱学习的毛毛 | 来源:发表于2018-02-09 15:57 被阅读0次

    springboot+thymeleaf项目,运行时页面报错信息如下:

    This application has noexplicitmappingfor/error, so you are seeing thisasa fallback.Sat Dec2315:25:59CST2017There was an unexpectederror(type=NotFound, status=404).No message available

    有可能出错的原因:

    1.没有在pom文件中添加thymeleaf的依赖

    2.在浏览器中输入的url不对

    url应该是/cotroller map/map

    例如以下代码访问地址:http://localhost:8080/hhllow/getUList

    @Controller

    @RequestMapping(value="/hhllow")

    public class UlevelController {

    @RequestMapping(value="getUList", method=RequestMethod.GET)

    publicStringgetUlevelList() { ………………

    return"ulevel/ulevelList";

    }

    }

    3. controller放的目录不对,

    应该与application.java在同一级或者下一级

    相关文章

      网友评论

          本文标题:springboot项目浏览器报错:There was an u

          本文链接:https://www.haomeiwen.com/subject/htzftftx.html