这是indexloc提供的服务,不要输入任何密码
Skip to content

Can we add option "No database" to generate a gateway without database when OIDC option is selected ? #6763

@maznag

Description

@maznag
Overview of the issue

As OIDC is supported in JHipster generator, can we add option "No database" to generate a gateway without database when OIDC option is selected?

The option "No database" is already existe for micro service application. It would be nice to add it for the gateway like for the microservices to not generate the corresponding code and configuration.

To run gateway without database we 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 the changes to make:

  1. Modify database options in .yo-rc.json as follows:
    "databaseType": "no",
    "devDatabaseType": "no",
    "prodDatabaseType": "no",

  2. run jhipster

  3. Delete some files:

  • config/DatabaseConfiguration.java
  • config/audit/AuditEventConverter.java
  • domain/AbstractAuditingEntity.java
  • domain/PersistentAuditEvent.java
  • config/liquibase folder and related files

I also noticed that the example to run database docker image is added to READE.me as follow:

For example, to start a no database in a docker container, run:
docker-compose -f src/main/docker/no.yml up -d
To stop it and remove the container, run:
docker-compose -f src/main/docker/no.yml down

Motivation for or Use Case

Testing microservices with OIDC

Related issues

#3919

Suggest a Fix

Doing same as microservice application + don't generate database example in README.md

JHipster Version(s)

4.11.1

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "gateway",
    "gitHubOrganization": "",
    "baseName": "GatewayTest",
    "packageName": "io.github.jhipster.application",
    "serverPort": 8080,
    "serviceDiscoveryType": "eureka",
    "authenticationType": "oauth2",
    "uaaBaseName": "../uaa",
    "hibernateCache": "hazelcast",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "no",
    "devDatabaseType": "no",
    "prodDatabaseType": "no",
    "searchEngine": false,
    "enableSwaggerCodegen": false,
    "messageBroker": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "useSass": false,
    "clientPackageManager": "yarn",
    "testFrameworks": [],
    "enableTranslation": false,
    "nativeLanguage": "en",
    "languages": [
      "en"
    ],
    "clientFramework": "angularX",
    "jhipsterVersion": "4.11.1",
    "packageFolder": "io/github/jhipster/application",
    "jhiPrefix": "jhi"
  }
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory

None !

Environment and Tools

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

git version 2.13.1
node: v8.7.0
npm: 5.5.1
bower: 1.8.2
gulp: [01:39:12] CLI version 1.4.0
yeoman: 2.0.0
yarn: 1.3.2
Docker version 17.09.0-ce, build afdb6d4
docker-compose version 1.16.1, build 6d1ac21

Browsers and Operating System

MacOS and Google Chrome

  • [ x ] Checking this box is mandatory (this is just to show you read everything)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions