英文:
JHipster Entities Menu is Empty after succeed import-jdl
问题
我刚刚通过Docker镜像安装了JHipster(VueJS),并直接从https://start.jhipster.tech/jdl-studio/导入了jdl文件。
然后我在不同的终端上运行了./mvnw -P-webpack
和yarn start
。
这两者都完美运行,应用程序通过./mvnw
在localhost:8080上运行,也可以通过npm start在localhost:9000上运行。
这是我当前的模式(来自http://localhost:9000/admin/docs):
这是我的问题,尽管模式已经完美导入,但实体菜单仍然为空。
我尝试了以下解决方案,但都没有用:
- 使用隐身浏览器以空缓存启动。
- 运行
./mvnw
和./mvnw -P-webpack
。 - 运行npm start。
有谁可以帮助我解决这个问题吗?
英文:
I have just installed JHipster (VueJS) thru docker image, and I imported jdl file directly form https://start.jhipster.tech/jdl-studio/.
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.
Both are works perfectly and app runs on the localhost:8080 thru ./mvnw and also localhost:9000 from npm start.
Here is my currentr schemas (From 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
- npm start
Any body can help me how to solve this issue?
答案1
得分: 1
通过使用-P-webpack
,您可以停用webpack配置文件,这意味着前端不会被Maven构建,也不会被捆绑到后端中,只有在通过端口9000访问webpack开发服务器时才有效。
否则,如果您通过后端端口(8080)访问它,您将看到最新成功构建的结果,而在您的情况下,该构建是在项目生成时还没有实体时进行的。
英文:
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.
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.
答案2
得分: 0
你是否检查了头部/菜单模块?
升级后,我丢失了所有实体列表。
根据情况,它似乎已从src/main/webapp/app/shared/layout/menus.entities.tsx
中移除(使用React)。对于使用Angular的用户,请检查相同的模块。
对我来说,还原生成器所做的更改解决了这个问题。
英文:
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). For those using Angular, check the same module.
Reverting changes made by the generator solved the problem for me.
答案3
得分: 0
生成JHipster项目直接从JDL中再现了这个问题。我在使用Angular时遇到了这个问题,所以它与Vue无关。
我通过将这个单一步骤分割成两步来找到了解决方法:
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
这解决了“没有实体”的问题。
英文:
Generating JHipster project directly from JDL reproduces the issue. I hit it with Angular, so it is not Vue related.
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.
答案4
得分: 0
将所有微服务和网关的整个代码重新生成到一个新文件夹中,使用 jhipster jdl 命令是一个选项。这对我起了作用。
jhipster jdl sample.jdl
英文:
Regenerating the entire code of all microservices and gateway into a new folder using jhipster jdl command is an option. It worked for me.
jhipster jdl sample.jdl
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论