# Technical Documentation: jhipster/generator-jhipster

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/jhipster/generator-jhipster)

### Overview (`README.md`)

[![Logo][jhipster-image]][jhipster-url]

[![NPM version][npm-image]][npm-url] [![Downloads][npmcharts-image]][npmcharts-url] [![Gitter][gitter-badge-image]][gitter-badge-url] [![Known Vulnerabilities][snyk-image]][snyk-url]

[](https://ge.jhipster.tech/scans)

Greetings, Java Hipster!

Full documentation and information is available on our website at [https://www.jhipster.tech][jhipster-url].

Please read our [guidelines](/CONTRIBUTING.md#submitting-an-issue) before submitting an issue. If your issue is a bug, please use the bug template pre-populated [here][issue-template]. For feature requests and queries you can use [this template][feature-template]. If you have found a potential security issue, please read our [security policy](/SECURITY.md) and contact us privately first: https://github.com/jhipster/generator-jhipster/security/policy

Before running the generator on a project you did not author, read [the trust model of `.yo-rc.json`](/SECURITY.md#the-trust-model-of-yo-rcjson): the file's properties become part of the generated application, and blueprints declared in it are executed on your machine.

## Contributing

We are honored by any contributions you may have small or large. Please refer to our [contribution guidelines and instructions document](https://github.com/jhipster/generator-jhipster/blob/main/CONTRIBUTING.md) for any information about contributing to the project.

## Supported Java and Node versions

The following Java and Node combinations are tested and verified by GitHub Actions:

| Java  | Node  | Status |
| ----- | ----- | ------ |
| 21/25 | 22/24 | ✅     |

## Sponsors

Support this project by becoming a sponsor! [Become a sponsor](https://opencollective.com/generator-jhipster) or [learn more about sponsoring the project](https://www.jhipster.tech/sponsors/).

**Thank you to our sponsors!**

### Gold sponsors

[![GoldSponsors][gold-sponsors-image]][gold-sponsors-url]

### Bronze sponsors

[![BronzeSponsors][bronze-sponsors-image]][bronze-sponsors-url]

### Backers

**Thank you to all our backers!**

[![Backers][backers-image]][backers-url]

<object data="https://opencollective.com/generator-jhipster/tiers/backer.svg?avatarHeight=40&width=890&button=false" type="image/svg+xml"></object>

## Daily Builds

Additional builds at [hipster-labs/jhipster-daily-builds](https://github.com/hipster-labs/jhipster-daily-builds)

| Pipeline Status                                                                      |
| :----------------------------------------------------------------------------------- |
| [![Angular Maven SQL][ng-maven-sql.yaml-badge]][ng-maven-sql.yaml-link]              |
| [![Angular Maven NoSQL][ng-maven-nosql.yaml-badge]][ng-maven-nosql.yaml-link]        |
| [![Angular Gradle SQL][ng-gradle-sql.yaml-badge]][ng-gradle-sql.yaml-link]           |
| [![Angular Gradle NoSQL][ng-gradle-nosql.yaml-badge]][ng-gradle-nosql.yaml-link]     |
| [![React Maven SQL][react-maven-sql.yaml-badge]][react-maven-sql.yaml-link]          |
| [![React Maven NoSQL][react-maven-nosql.yaml-badge]][react-maven-nosql.yaml-link]    |
| [![React Gradle SQL][react-gradle-sql.yaml-badge]][react-gradle-sql.yaml-link]       |
| [![React Gradle NoSQL][react-gradle-nosql.yaml-badge]][react-gradle-nosql.yaml-link] |
| [![Vue Maven SQL][vue-maven-sql.yaml-badge]][vue-maven-sql.yaml-link]                |
| [![Vue Maven NoSQL][vue-maven-nosql.yaml-badge]][vue-maven-nosql.yaml-link]          |
| [![Vue Gradle SQL][vue-gradle-sql.yaml-badge]][vue-gradle-sql.yaml-link]             |
| [![Vue Gradle NoSQL][vue-gradle-nosql.yaml-badge]][vue-gradle-nosql.yaml-link]       |
| [![Elasticsearch][elasticsearch.yaml-badge]][elasticsearch.yaml-link]                |
| [![Monolith OAuth 2.0][monolith-oauth2.yaml-badge]][monolith-oauth2.yaml-link]       |
| [![No Database][no-database.yaml-badge]][no-database.yaml-link]                      |
| [![Microservices JWT][ms-jwt.yaml-badge]][ms-jwt.yaml-link]                          |
| [![Microservices OAuth 2.0][ms-oauth2.yaml-badge]][ms-oauth2.yaml-link]              |
| [![Docker Image][docker-image.yaml-badge]][docker-image.yaml-link]                   |
| [![Official Windows][windows.yaml-badge]][windows.yaml-link]                         |

## Analysis of the sample JHipster project

[![sonar-quality-gate][sonar-quality-gate]][sonar-url] [![sonar-coverage][sonar-coverage]][sonar-url] [![sonar-bugs][sonar-bugs]][sonar-url] [![sonar-vulnerabilities][sonar-vulnerabilities]][sonar-url] [![sonar-sample-code-smells-badge][sonar-sample-code-smells-badge]][sonar-sample-code-smells-url]

[ng-maven-sql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-maven-sql.yaml/badge.svg
[ng-maven-sql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-maven-sql.yaml
[ng-maven-nosql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-maven-nosql.yaml/badge.svg
[ng-maven-nosql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-maven-nosql.yaml
[ng-gradle-sql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-gradle-sql.yaml/badge.svg
[ng-gradle-sql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-gradle-sql.yaml
[ng-gradle-nosql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-gradle-nosql.yaml/badge.svg
[ng-gradle-nosql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ng-gradle-nosql.yaml
[react-maven-sql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-maven-sql.yaml/badge.svg
[react-maven-sql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-maven-sql.yaml
[react-maven-nosql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-maven-nosql.yaml/badge.svg
[react-maven-nosql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-maven-nosql.yaml
[react-gradle-sql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-gradle-sql.yaml/badge.svg
[react-gradle-sql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-gradle-sql.yaml
[react-gradle-nosql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-gradle-nosql.yaml/badge.svg
[react-gradle-nosql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/react-gradle-nosql.yaml
[vue-maven-sql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-maven-sql.yaml/badge.svg
[vue-maven-sql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-maven-sql.yaml
[vue-maven-nosql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-maven-nosql.yaml/badge.svg
[vue-maven-nosql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-maven-nosql.yaml
[vue-gradle-sql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-gradle-sql.yaml/badge.svg
[vue-gradle-sql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-gradle-sql.yaml
[vue-gradle-nosql.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-gradle-nosql.yaml/badge.svg
[vue-gradle-nosql.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/vue-gradle-nosql.yaml
[elasticsearch.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/elasticsearch.yaml/badge.svg
[elasticsearch.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/elasticsearch.yaml
[monolith-oauth2.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/monolith-oauth2.yaml/badge.svg
[monolith-oauth2.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/monolith-oauth2.yaml
[no-database.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/no-database.yaml/badge.svg
[no-database.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/no-database.yaml
[ms-jwt.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ms-jwt.yaml/badge.svg
[ms-jwt.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ms-jwt.yaml
[ms-oauth2.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ms-oauth2.yaml/badge.svg
[ms-oauth2.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/ms-oauth2.yaml
[docker-image.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/docker-image.yaml/badge.svg
[docker-image.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/docker-image.yaml
[windows.yaml-badge]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/windows.yaml/badge.svg
[windows.yaml-link]: https://github.com/hipster-labs/jhipster-daily-builds/actions/workflows/windows.yaml
[sonar-url]: https://sonarcloud.io/dashboard?id=jhipster-sample-application
[sonar-quality-gate]: https://sonarcloud.io/api/project_badges/measure?project=jhipster-sample-application&metric=alert_status
[sonar-coverage]: https://sonarcloud.io/api/project_badges/measure?project=jhipster-sample-application&metric=coverage
[sonar-bugs]: https://sonarcloud.io/api/project_badges/measure?project=jhipster-sample-application&metric=bugs
[sonar-sample-code-smells-badge]: https://sonarcloud.io/api/project_badges/measure?project=jhipster-sample-application&metric=code_smells
[sonar-sample-code-smells-url]: https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=jhipster-sample-application
[sonar-vulnerabilities]: https://sonarcloud.io/api/project_badges/measure?project=jhipster-sample-application&metric=vulnerabilities
[jhipster-image]: https://raw.githubusercontent.com/jhipster/jhipster-artwork/main/logos/v2/normal/V2%20JHipster%20RGB.png
[jhipster-url]: https://www.jhipster.tech/
[npm-image]: https://badge.fury.io/js/generator-jhipster.svg
[npm-url]: https://npmjs.org/package/generator-jhipster
[github-actions-generator-image]: https://github.com/jhipster/generator-jhipster/workflows/Generator/badge.svg
[github-actions-angular-image]: https://github.com/jhipster/generator-jhipster/workflows/Angular/badge.svg
[github-actions-react-image]: https://github.com/jhipster/generator-jhipster/workflows/React/badge.svg
[github-actions-vue-image]: https://github.com/jhipster/generator-jhipster/workflows/Vue/badge.svg
[github-actions-url]: https://github.com/jhipster/generator-jhipster/actions
[backers-image]: https://opencollective.com/generator-jhipster/tiers/backer.svg?avatarHeight=70&width=890
[backers-url]: https://opencollective.com/generator-jhipster
[bronze-sponsors-image]: https://opencollective.com/generator-jhipster/tiers/bronze-sponsor.svg?avatarHeight=120&width=890
[bronze-sponsors-url]: https://opencollective.com/generator-jhipster
[gold-sponsors-image]: https://opencollective.com/generator-jhipster/tiers/gold-sponsor.svg?avatarHeight=180&width=890
[gold-sponsors-url]: https://opencollective.com/generator-jhipster
[issue-template]: https://github.com/jhipster/generator-jhipster/issues/new?template=BUG_REPORT.md
[feature-template]: https://github.com/jhipster/generator-jhipster/issues/new?template=FEATURE_REQUEST.md
[npmcharts-image]: https://img.shields.io/npm/dm/generator-jhipster.svg?label=Downloads&style=flat
[npmcharts-url]: https://npm.chart.dev/generator-jhipster?primary=sky&gray=cool&theme=dark
[gitter-badge-image]: https://badges.gitter.im/jhipster/generator-jhipster.svg
[gitter-badge-url]: https://gitter.im/jhipster/generator-jhipster?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
[snyk-image]: https://snyk.io/test/npm/generator-jhipster/badge.svg
[snyk-url]: https://snyk.io/test/npm/generator-jhipster

---

### Overview (`.github/MAINTAINERS_REPLY_TEMPLATES/README.md`)

# Reply templates for maintainers

Here is a list of common **reply messages** shared by core team members to help them respond to issues.

You can add those to your [GitHub saved replies settings](https://github.com/settings/replies).

- [Guidelines are not followed](GUIDELINES_NOT_FOLLOWED.md)
- [Use Stack Overflow](USE_STACK_OVERFLOW.md)
- [Don't comment on an old issue](DONT_COMMENT_ON_OLD_ISSUE.md)
- [Build as a module](BUILD_AS_MODULE.md)

---

### Overview (`generators/app/README.md`)

# app sub-generator

`jhipster` command entrypoint, it composes with `common`, `languages`, `server`, and `client`.

## Customizing

JHipster implementation allows you to override almost every aspect of the generation process.

[SQL/spring-boot:data-relational customizations](../spring-boot/generators/data-relational/README.md#sqlspring-bootdata-relational-sub-generator)

### Application

JDL doesn't support annotations, customizations must be done through local blueprint.

`.blueprint/app/generator.mjs` (to create a local blueprint follow https://www.jhipster.tech/modules/creating-a-blueprint/#local-blueprints):

```js
get [Generator.PREPARING]() {
  return {
    customize({ application }) {
      application.baseNameHumanized = 'Custom application title';
    },
  };
}
```

### Entities

Every annotation is loaded as entities properties and will be used at generation process.

```jdl
@CustomsProp1(customValue)
entity Bar {}
```

`.jhipster/Bar.json`:

```json
{
  "name": "Bar",
  "annotations": {
    "customsProp1": "customValue"
  }
}
```

#### Notable customizations

##### Label

```
@EntityClassHumanized("Departamento")
@EntityClassPluralHumanized("Departamentos")
entity Department {}
```

##### Translation variant

Translation variant allows different translations for the entity whenever applicable.

```jdl
@EntityI18nVariant('female')
@EntityClassHumanized("Empresa")
@EntityClassPluralHumanized("Empresas")
entity Company {}
```

`female` variant is supported by `pt-br` locale.

##### Authority

Secure the entity with the authority.

```
@EntityAuthority(ROLE_ADMIN)
@EntityReadAuthority(ROLE_USER)
entity Department {}
```

##### Admin Entity

Declare the entity as an admin entity like User and Authority.
The entity is added to the admin menu and secured with ROLE_ADMIN authority.

```
@AdminEntity
entity Department {}
```

### Fields

#### Notable customizations

##### Label

```jdl
entity Company {
  @FieldNameHumanized('Company Name')
  company_name
}
```

### Relationships

#### Notable customizations

##### Label

```jdl
relationship ManyToOne {
  @RelationshipNameHumanized('Company user') Company{user} to User
}
```

##### Eager loading relationships

Applicable to SQL/spring-data-relational with partial support at MongoDb/spring-data-mongodb.
Neo4j eager loads every relationship by default.

JHipster UI uses only the id and `otherEntityFieldName` properties, by default only fields used by the UI will be fetched.

```jdl
relationship OneToMany {
  @RelationshipEagerLoad Bar to @RelationshipEagerLoad Foo
}
```

Related issues: [#23917](https://github.com/jhipster/generator-jhipster/issues/23917)

---

### Overview (`generators/liquibase/README.md`)

# liquibase sub-generator

Adds support to liquibase to SQL databases and Neo4j.

## Customizing

Customizing basics can be found at [Customizing](../app/README.md#customizing)

### Notable relationships customizations

#### OnUpdate/OnDelete

```jdl
relationship ManyToOne {
  A to @OnDelete("SET NULL") @OnUpdate("CASCADE") B
}
```

Allowed values: `NO ACTION | RESTRICT | CASCADE | SET NULL | SET DEFAULT`

---

### Overview (`generators/server/README.md`)

# server sub-generator

Server generator.

## Customizing

### Entities

#### Notable customizations

##### Layers

Every layer is generated for every Entity by default.
It's possible to disable layers.

```
@EntityDomainLayer(false)
@EntityPersistenceLayer(false)
@EntityRestLayer(false)
entity OptionalLayers {}
```

---

### Overview (`generators/spring-boot/README.md`)

# spring-boot sub-generator

Spring Boot generator.

## Customizing

### Entities

#### Notable customizations

##### Layers

Customize @PreAuthorize annotations at Rest layer.
Calculated using [@EntityAuthority](../app/README.md#authority) by default.

```
@EntitySpringPreAuthorize("hasAuthority('ROLE_CUSTOM')")
@EntitySpringReadPreAuthorize("hasAuthority('ROLE_CUSTOM_READ')")
entity CustomPreAuthorize {}
```

---

### Overview (`generators/upgrade/README.md`)

# upgrade sub-generator

Upgrades the application to a newer generator-jhipster version.

The upgrade process generates 4 commits:

- the reference application
- a merge commit with unrelated histories
- the upgrade application
- a merge commit to apply the upgrade commit to the existing application

## Upgrading from v7

To upgrade to v8 you need to upgrade to v7.9.4 before due to node v18/v20 compatibility.
If you use a blueprint that uses jhipster v7, you need to use [jhipster-migrate](https://github.com/jhipster/generator-jhipster-migrate/).

## Changing the application configuration

It's possible to apply configuration changes using the upgrade process.

For example to switch databases:

```
jhipster upgrade --apply-config --db postgresql
```

To remove admin ui:

```
jhipster upgrade --apply-config --no-with-admin-ui
```

For more configuration options run:

```
jhipster app --help
```

---

### Overview (`generators/java-simple-application/generators/openapi-generator/README.md`)

# java:openapi-generator sub-generator

Generates openapi import structure that generates backend code using `src/main/resources/swagger/api.yml` openapi definition.

[openapi-generator](https://github.com/OpenAPITools/openapi-generator/tree/master)
[openapi-generator-maven-plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin)
[openapi-generator-gradle-plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin)

---

### Overview (`generators/java/generators/gatling/README.md`)

# Gatling sub-generator

Generates load testing simulations for entities using [Gatling](https://gatling.io/).

## Logging tips

```
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
{
    // Log all HTTP requests
    //context.getLogger("io.gatling.http").setLevel(Level.valueOf("TRACE"));
    // Log failed HTTP requests
    //context.getLogger("io.gatling.http").setLevel(Level.valueOf("DEBUG"));
}
```

---

### Overview (`generators/spring-boot/generators/data-elasticsearch/README.md`)

# spring-boot:data-elasticsearch sub-generator

Elasticsearch for Spring generator.

## Customizing

### Entities

#### Notable customizations

##### Search Layer

Disable the search service generation.

```
@EntitySearchLayer(false)
entity OptionalLayers {}
```

---

### Overview (`generators/spring-boot/generators/data-relational/README.md`)

# SQL/spring-boot:data-relational sub-generator

Adds support to spring-boot:data-relational and provides sql related utilities.

## Customizing

Customizing basics can be found at [Customizing](../../../app/README.md#customizing)

---

### Overview (`.blueprint/generate-sample/templates/test-integration/samples/README.md`)

# Sample application generation

To generate test applications, either automatically by the CI or locally on the developer machine, a number of pre-defined configurations have been prepared.

## Application configurations

Those are described in `.yo-rc.json` files which is the descriptor file created by Yeoman to keep track of the choices selected while generating an application.

- app-sample-dev: left empty for local testing, launching the generator with the VSCode debugger will generate an app in this folder
- jdl-default
- ms-micro-consul
- ms-micro-eureka
- ms-micro-eureka-infinispan
- ms-micro-eureka-jwt
- ms-ng-gateway-consul
- ms-ngx-gateway-eureka
- ms-ngx-gateway-eureka-jwt
- ms-ngx-gateway-eureka-oauth2
- ms-react-gateway-consul-jwt
- ms-react-gateway-consul-oauth2
- ngx-couchbase
- ngx-gradle-couchbase-search
- ngx-neo4j
- ngx-default
- ngx-gradle-fr
- ngx-gradle-mariadb-oauth2-infinispan
- ngx-gradle-mongodb-kafka-cucumber
- ngx-gradle-psql-es-noi18n-mapsid
- ngx-gradle-npm-h2disk-ws-nocache
- ngx-h2mem-ws-nol2
- ngx-mariadb-oauth2-infinispan
- ngx-mariadb-oauth2-sass-infinispan
- ngx-mongodb-kafka-cucumber
- ngx-psql-es-noi18n-mapsid
- ngx-session-cassandra-fr
- react-default
- react-gradle-cassandra-session-redis
- react-gradle-couchbase-caffeine
- react-gradle-h2mem-memcached
- react-gradle-psql-es-noi18n-mapsid
- react-maven-cassandra-session-redis
- react-maven-couchbase-caffeine
- react-maven-h2mem-memcached
- react-maven-psql-es-noi18n-mapsid
- react-noi18n-es-ws-gradle-session
- webflux-mongodb
- webflux-mongodb-oauth2
- webflux-mongodb-session
- webflux-gateway-jwt
- webflux-gateway-oauth2
- webflux-couchbase
- webflux-couchbase-session
- webflux-couchbase-oauth2
- webflux-mysql-kafka
- webflux-psql

## Entity configurations

We also have a number of `Entity.json` files for testing different entity configurations.

---

--- METRICS ---
- Files Extracted: 12
- Estimated Token Budget: ~5364 tokens
- Canonical Reference: https://codewiki.google/github.com/jhipster/generator-jhipster
