简体   繁体   中英

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. But now, I tried to upgrade my JHipster version to 5.3.1 and the option is no longer available.

Is the no database option removed for Gateway Microservice in JHipster v5.3.1?

In v5, OAuth2 microservices require a database. This change happened because OAuth2 microservice entities can now have relationships with the User, which means the user table is required. A related issue with some discussion can be found here: 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. 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:

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

Then run 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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