Closed daanhan closed 1 year ago
hi,can you fix it?
@yu199195 Hello! can not find the location of Admin UI project. Please show it.
你可以通过shenyu-dashboard/src/index.ejs
来设置
例如src/index.ejs:30
<div id="httpPath" style="display: none" th:text="<%='$'%>{domain}">${process.env.NODE_ENV === 'production' ? '' : 'http://localhost:9095'}</div>
可以修改为
<div id="httpPath" style="display: none" th:text="<%='$'%>{domain}">${process.env.NODE_ENV === 'production' ? '/shenyuadmin' : 'http://localhost:9095/shenyuadmin'}</div>
即可实现
Question
期望通过路径localhost:9095/shenyuadmin来访问admin页面。
在admin工程的application.yml文件中添加server.servlet.contextPath=/shenyuadmin,可以让springboot接口修改了路径。 但vue相关的js和html代码中,无法方便的调整路径。 建议vue中相关代码使用相对路径来访问java接口,或提供合适的修改方式,谢谢!
I hope to browse localhost:9095/shenyuadmin to use Shenyu Admin. When add server.servlet.contextPath=/shenyuadmin to application.yml file, it can not change absolution API path in VUE js and html files. I propse change the absolution API path to relative path, in case we change contextPath in springboot.