简体   繁体   English

JHipster v5.3.1中的网关微服务是否删除了“无数据库”选项?

[英]Is the “no database” option removed for Gateway Microservice in JHipster v5.3.1?

I once created a Gateway Microservice application without databases using OIDC. 我曾经使用OIDC创建了没有数据库的Gateway Microservice应用程序。 But now, I tried to upgrade my JHipster version to 5.3.1 and the option is no longer available. 但是现在,我尝试将JHipster版本升级到5.3.1,并且该选项不再可用。

Is the no database option removed for Gateway Microservice in JHipster v5.3.1? JHipster v5.3.1中的网关微服务是否删除了“ no database选项?

In v5, OAuth2 microservices require a database. 在v5中,OAuth2微服务需要一个数据库。 This change happened because OAuth2 microservice entities can now have relationships with the User, which means the user table is required. 发生此更改是因为OAuth2微服务实体现在可以与User建立关系,这意味着需要user表。 A related issue with some discussion can be found here: https://github.com/jhipster/generator-jhipster/issues/7669 可以在这里找到有关讨论的相关问题: https : //github.com/jhipster/generator-jhipster/issues/7669

We're open to contributions but there doesn't seem to be a simple way to allow both behaviors. 我们愿意做出贡献,但是似乎没有一种允许这两种行为的简单方法。

To run Gateway without database you have to manually make some changes and run jhipster again to regenerate it. 要在没有数据库的情况下运行Gateway,您必须手动进行一些更改, jhipster再次运行jhipster以重新生成它。 But it's convenient to make these changes after every upgrade. 但是在每次升级后进行这些更改很方便。 Below are the changes to make: 以下是要进行的更改:

Modify database options in .yo-rc.json as follows: 修改.yo-rc.json中的数据库选项,如下所示:

"databaseType": "no",
"devDatabaseType": "no",
"prodDatabaseType": "no",

Then run jhipster 然后运行jhipster

Delete these files: 删除这些文件:

config/DatabaseConfiguration.java
config/audit/AuditEventConverter.java
domain/AbstractAuditingEntity.java
domain/PersistentAuditEvent.java

And delete config/liquibase folder and all related files. 并删除config/liquibase文件夹和所有相关文件。

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

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