在初始化文件init.json中href去掉/发现运行后404
在初始化文件init.json中href去掉/发现运行后404无奈只能加上,但加上地址栏会有双杠 #// 出现
如http://localhost:8001/houtai#//bookgl/tolist
查找很久发现是与控制器路径有关
@Controller@RequestMapping("/houtai")
public class BaseController {
@RequestMapping("/index")//基础路径
public String houtai(){
return "houtai/index";
}
@RequestMapping("/welcome")//欢迎页
public String welcome(){
return "welcome";
}
}上面那样会出现// 现象,与写了总路径有关,但具体原因猜测和layuimini有关
改成下面这样问题终于解决
@Controller
public class BaseController {
@RequestMapping("/houtai")//基础路径
public String houtai(){
return "houtai/index";
}
@RequestMapping("/welcome")//欢迎页
public String welcome(){
return "welcome";
}
}
爱笔记