白标错误页面 404 spring boot angular 6 [英] whitelabel error page 404 spring boot angular 6

查看:37
本文介绍了白标错误页面 404 spring boot angular 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有弹簧靴的 angular 6.我将dist"文件复制到 spring boot 项目.并且项目运行正常.但是当我刷新浏览器时,它说白标错误".我如何防止白标错误.

I am using angular 6 with spring boot. i copied 'dist' file to spring boot project. and project running properly. but when i refresh the browser, it said 'white label error'. how i prevent from white label error.

工作网址

错误页面(刷新时)

推荐答案

你应该使用 RouterModule.forRoot(AppRoutes, {useHash: true}), useHash As true

You should use RouterModule.forRoot(AppRoutes, {useHash: true}), useHash As true

https://angular.io/api/common/HashLocationStrategy 应该可以帮助您理解.

https://angular.io/api/common/HashLocationStrategy should help you understand.

这篇关于白标错误页面 404 spring boot angular 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆