简体   繁体   English

成功导入 jdl 后,JHipster 实体菜单为空

[英]JHipster Entities Menu is Empty after succeed import-jdl

I have just installed JHipster (VueJS) thru docker image, and I imported jdl file directly form https://start.jhipster.tech/jdl-studio/ .我刚刚通过 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!

And then I ran ./mvnw -P-webpack and also yarn start on the different terminal.然后我在不同的终端上运行 ./mvnw -P-webpack 和 yarn start 。

在此处输入图片说明

在此处输入图片说明

Both are works perfectly and app runs on the localhost:8080 thru ./mvnw and also localhost:9000 from npm start.两者都可以完美运行,应用程序在 localhost:8080 到 ./mvnw 以及 localhost:9000 从 npm start 上运行。

Here is my currentr schemas (From http://localhost:9000/admin/docs) :这是我当前的架构(来自 http://localhost:9000/admin/docs):

在此处输入图片说明

And here is my problem, Although the schemas already imported perfectly but the Entities Menu is still Empty.这是我的问题,虽然模式已经完美导入,但实体菜单仍然是空的。

在此处输入图片说明

在此处输入图片说明

I have tried following sollution but nothing is work:我尝试了以下解决方案,但没有任何效果:

  • Incognito browser to start with empty cache.隐身浏览器以空缓存开始。
  • ./mvnw and also ./mvnw -P-webpack ./mvnw 和 ./mvnw -P-webpack
  • npm start启动

Any body can help me how to solve this issue?任何机构都可以帮助我如何解决这个问题?

By using -P-webpack , you deactivate webpack profile which means the frontend is not built by maven and not bundled in the backend, this works only if you access the frontend through the webpack dev server on port 9000.通过使用-P-webpack ,您可以停用 webpack 配置文件,这意味着前端不是由 maven 构建的,也不是捆绑在后端中,这仅在您通过端口 9000 上的 webpack 开发服务器访问前端时才有效。

Otherwise if you access it through the backend port (8080) you'll see the result of latest successful build which in your case was at the project generation when there was no entities yet.否则,如果您通过后端端口 (8080) 访问它,您将看到最新成功构建的结果,在您的情况下,该结果是在项目生成时还没有实体。

Have you checked your header/menues module?你检查过你的标题/菜单模块吗? I lost all my entities list when I upgraded.升级时我丢失了所有实体列表。

It was removed from src/main/webapp/app/shared/layout/menus.entities.tsx as it seems (using react).它已从src/main/webapp/app/shared/layout/menus.entities.tsx (使用 react)。 For those using Angular, check the same module.对于那些使用 Angular 的人,请检查相同的模块。

Reverting changes made by the generator solved the problem for me.恢复生成器所做的更改为我解决了这个问题。

在此处输入图片说明

Generating JHipster project directly from JDL reproduces the issue.直接从 JDL 生成 JHipster 项目会重现该问题。 I hit it with Angular, so it is not Vue related.我用 Angular 打了它,所以它与 Vue 无关。

I got solution by splitting this single step:我通过拆分这一步得到了解决方案:

jhipster import-jdl my-jdl-file.jdl

to:到:

jhipster
jhipster import-jdl my-jdl-file.jdl

or to:或者:

jhipster import-jdl my-jdl-file-application-part-only.jdl
jhipster import-jdl my-jdl-file-entities-part.jdl

It solves the "no entities" problem.它解决了“无实体”问题。

Regenerating the entire code of all microservices and gateway into a new folder using jhipster jdl command is an option.使用 jhipster jdl 命令将所有微服务和网关的整个代码重新生成到一个新文件夹中是一种选择。 It worked for me.它对我有用。

jhipster jdl sample.jdl

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

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