[英]JHipster Entities Menu is Empty after succeed import-jdl
我剛剛通過 docker 鏡像安裝了 JHipster (VueJS),我直接從https://start.jhipster.tech/jdl-studio/導入了 jdl 文件。
jhipster@66b8176ee05f:~/app$ jhipster import-jdl ../jhipster.jdl
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing import-jdl ../jhipster.jdl
INFO! Found .yo-rc.json on path. This is an existing app
INFO! The JDL is being parsed.
warn: In the One-to-Many relationship from Employee to Job, only bidirectionality is supported for a One-to-Many association. The other side will be automatically added.
warn: In the One-to-Many relationship from Department to Employee, only bidirectionality is supported for a One-to-Many association. The other side will be automatically added.
INFO! No change in entity configurations, no entities were updated.
INFO! The JDL has been successfully parsed
INFO! Congratulations, JHipster execution is complete!
然后我在不同的終端上運行 ./mvnw -P-webpack 和 yarn start 。
兩者都可以完美運行,應用程序在 localhost:8080 到 ./mvnw 以及 localhost:9000 從 npm start 上運行。
這是我當前的架構(來自 http://localhost:9000/admin/docs):
這是我的問題,雖然模式已經完美導入,但實體菜單仍然是空的。
我嘗試了以下解決方案,但沒有任何效果:
任何機構都可以幫助我如何解決這個問題?
通過使用-P-webpack
,您可以停用 webpack 配置文件,這意味着前端不是由 maven 構建的,也不是捆綁在后端中,這僅在您通過端口 9000 上的 webpack 開發服務器訪問前端時才有效。
否則,如果您通過后端端口 (8080) 訪問它,您將看到最新成功構建的結果,在您的情況下,該結果是在項目生成時還沒有實體。
直接從 JDL 生成 JHipster 項目會重現該問題。 我用 Angular 打了它,所以它與 Vue 無關。
我通過拆分這一步得到了解決方案:
jhipster import-jdl my-jdl-file.jdl
到:
jhipster
jhipster import-jdl my-jdl-file.jdl
或者:
jhipster import-jdl my-jdl-file-application-part-only.jdl
jhipster import-jdl my-jdl-file-entities-part.jdl
它解決了“無實體”問題。
使用 jhipster jdl 命令將所有微服務和網關的整個代碼重新生成到一個新文件夾中是一種選擇。 它對我有用。
jhipster jdl sample.jdl
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.