码迷,mamicode.com
首页 > 编程语言 > 详细

springboot整合html的404

时间:2019-02-15 13:34:05      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:type   color   roo   spring   ack   pre   font   ppi   ret   

在用springboot对html的页面进行渲染时,页面找不到报404(type=Not Found, status=404).,

解决办法:是在ctroller层加相应的           @RequestMapping("root")

 

@Controller
public class FrasAdminCotrller {
    @RequestMapping("root")
    public String  login(){
         return "admin/root";     (admin中root,为root.html)

    }

 且 

 @RequestMapping("XXX")中的XXX要和XXX.html保持一致!!!!!

springboot整合html的404

标签:type   color   roo   spring   ack   pre   font   ppi   ret   

原文地址:https://www.cnblogs.com/leeego-123/p/10382923.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!