84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我不需要用到模板,所以把访问定向到static/index.html静态页面去.
@RequestMapping("/")
public String index() { return "redirect:/index.html"; }
这么简单的语句在eclipse下把项目当程序运行提示404错误.但gradle 构建的程序用命令行java -jar build/libs/xxx.jar又正常能访问到.是什么道理?或者有其他替代方案吗?
光阴似箭催人老,日月如移越少年。
If it is just a simple page jump, you can inherit theWebMvcConfigurerAdapter类,覆盖addViewControllersmethod and add ViewController for configuration.
WebMvcConfigurerAdapter
addViewControllers
Reporting 404 is an obvious project deployment problem~, search for contextpath related information
If it is just a simple page jump, you can inherit the
WebMvcConfigurerAdapter
类,覆盖addViewControllers
method and add ViewController for configuration.Reporting 404 is an obvious project deployment problem~, search for contextpath related information