java - 通过 jhipster 向实体添加字段
问题描述
我在 jhipster 的帮助下创建了实体并手动修改了实体。随着时间的推移,我需要添加更多字段。jhipster entity Download
我一步一步地运行并按照说明进行操作。此后生成器谈论冲突并提供完全替换许多文件:
conflict .jhipster/Download.json
? Overwrite .jhipster/Download.json? show the differences between the old and the new
所以应该是?然后我不明白哪些代码包含下一个注释行:
@CreatedBy
@ManyToOne
@JsonIgnoreProperties("downloads")
private User user;
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public UUID getId() {
return id;
}
解决方案
要在 JHipster 实体中添加字段,唯一可行的方法是重新生成该实体并覆盖现有文件。
JHipster 当前未使用添加的针(我在代码中找不到对它的引用)并且仅因为用户在此问题中请求它而存在https://github.com/jhipster/generator-jhipster/issues /6246。
推荐阅读
- c - HackerRank 网站中的 Clang 问题“Small Triangles, Large Triangles”
- ajax - 从 imdb 获取信息的问题
- javascript - 是否可以在不使用 ng-app 的情况下运行此功能?
- c++ - 如何修复“未定义的引用”错误opencv和g ++
- laravel - 为什么 Laravel Paginator 在前端不能正常工作?
- ios - iOS 13:导航控制器内的滚动视图不会在状态栏下方
- javascript - 使用 javascript 在 IE 11 中打印计算表(交互式表单)
- python - 无法使用 Selenium 上传文件
- .net - Blazor 中的等效 Angular RouterOutlet
- monitoring - 在 icinga 中大规模确认警报