【发布时间】:2018-08-28 19:59:39
【问题描述】:
我有一个 web 服务在 springboot 的 8080 端口上运行。当我点击下面的 url 时它工作正常:
http://localhost:8080/app,我把网址重定向到下面:
http://localhost:8080/myHome/home
现在当我刷新页面时,我得到 404
下面是我的 index.html 的内容:
<base href="/myHome">
package.json:
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build --dev --deploy-url=\"/app/\"",
"test": "ng test",
"lint": "ng lint",
"e2e": "protractor"
},
我曾尝试使用
中提到的 LocationStrategyAngular 2: 404 error occur when I refresh through the browser ,但它不适合我。
【问题讨论】:
标签: spring-boot angular2-routing angular5