简体   繁体   English

Jhipster:上下文路径更改在管理部分显示错误

[英]Jhipster: Context-path change showing errors in Administration section

I have changed the context path in my jHipster application at resources/config/application.yml server.servlet.contextPath: /myContext我在资源/config/application.yml server.servlet.contextPath: /myContext更改了 jHipster 应用程序中的上下文路径

After these changes, jHipster generated UI unable to make API calls from the Administration section.在这些更改之后,jHipster 生成的 UI 无法从管理部分进行 API 调用。 jhipsterVersion": "6.8.0" jhipsterVersion": "6.8.0"

After researching and debugging it for couple of days, finally found the solution so if you are working on the Jhipster 6.8 since I have changed the default context to custom one, you need to change the same thing in your webpack.common.js new BaseHrefWebpackPlugin({ baseHref: '/myContext/' }), .经过几天的研究和调试,终于找到了解决方案,所以如果您正在使用 Jhipster 6.8,因为我已将默认上下文更改为自定义上下文,您需要在 webpack.common.js new BaseHrefWebpackPlugin({ baseHref: '/myContext/' }),中更改相同的内容new BaseHrefWebpackPlugin({ baseHref: '/myContext/' }), . And it will do the magic for you.它会为你创造奇迹。

Cheers !!!干杯!!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM