├── .husky └── pre-commit ├── generators ├── detekt │ ├── resources │ │ ├── build.gradle │ │ └── gradle │ │ │ └── libs.versions.toml │ ├── index.js │ ├── command.js │ ├── templates │ │ └── gradle │ │ │ └── detekt.gradle.ejs │ └── generator.spec.js ├── kotlin │ ├── resources │ │ ├── build.gradle │ │ └── gradle │ │ │ └── libs.versions.toml │ ├── support │ │ ├── index.js │ │ ├── constants.js │ │ └── files.js │ ├── index.js │ ├── command.js │ ├── templates │ │ ├── .editorconfig.jhi.kotlin.ejs │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── _package_ │ │ │ └── GeneratedByJHipster.kt.ejs │ └── generator.spec.js ├── ktlint │ ├── resources │ │ ├── build.gradle │ │ └── gradle │ │ │ └── libs.versions.toml │ ├── index.js │ ├── templates │ │ ├── .gitignore.jhi.ktlint.ejs │ │ └── gradle │ │ │ └── ktlint.gradle.ejs │ ├── command.js │ ├── internal │ │ ├── ktlint-worker.js │ │ ├── ktlint-transform-using-threads.js │ │ └── ktlint-transform.js │ └── generator.spec.js ├── migration │ ├── index.js │ ├── command.js │ ├── __snapshots__ │ │ └── generator.spec.js.snap │ └── generator.spec.js ├── spring-boot │ ├── index.js │ ├── command.js │ ├── templates │ │ ├── spring-data-cassandra │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── config │ │ │ │ └── EmbeddedCassandra.kt.ejs │ │ ├── src │ │ │ ├── main │ │ │ │ ├── kotlin │ │ │ │ │ └── _package_ │ │ │ │ │ │ ├── config │ │ │ │ │ │ ├── ReactorConfiguration.kt.ejs │ │ │ │ │ │ ├── Constants.kt.ejs │ │ │ │ │ │ └── ApplicationProperties.kt.ejs │ │ │ │ │ │ ├── security │ │ │ │ │ │ ├── AuthoritiesConstants.kt.ejs │ │ │ │ │ │ ├── UserNotActivatedException.kt.ejs │ │ │ │ │ │ └── SpringSecurityAuditorAware.kt.ejs │ │ │ │ │ │ ├── web │ │ │ │ │ │ └── rest │ │ │ │ │ │ │ ├── vm │ │ │ │ │ │ │ └── KeyAndPasswordVM.kt.ejs │ │ │ │ │ │ │ └── errors │ │ │ │ │ │ │ ├── FieldErrorVM.kt.ejs │ │ │ │ │ │ │ ├── EmailAlreadyUsedException.kt.ejs │ │ │ │ │ │ │ ├── LoginAlreadyUsedException.kt.ejs │ │ │ │ │ │ │ └── InvalidPasswordException.kt.ejs │ │ │ │ │ │ ├── service │ │ │ │ │ │ ├── InvalidPasswordException.kt.ejs │ │ │ │ │ │ ├── EmailAlreadyUsedException.kt.ejs │ │ │ │ │ │ ├── UsernameAlreadyUsedException.kt.ejs │ │ │ │ │ │ └── dto │ │ │ │ │ │ │ └── PasswordChangeDTO.kt.ejs │ │ │ │ │ │ └── _entityPackage_ │ │ │ │ │ │ └── _partials_entity_ │ │ │ │ │ │ ├── delete_template.ejs │ │ │ │ │ │ └── get_template.ejs │ │ │ │ └── resources │ │ │ │ │ └── banner.txt │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ ├── config │ │ │ │ ├── WebConfigurerTestController.kt.ejs │ │ │ │ └── AsyncSyncConfiguration.kt.ejs │ │ │ │ └── _entityPackage_ │ │ │ │ └── service │ │ │ │ └── mapper │ │ │ │ └── _entityClass_MapperTest.kt.ejs │ │ ├── cucumber │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── cucumber │ │ │ │ ├── CucumberIT.kt.ejs │ │ │ │ ├── CucumberTestContextConfiguration.kt.ejs │ │ │ │ └── stepdefs │ │ │ │ └── StepDefs.kt.ejs │ │ ├── kafka │ │ │ └── src │ │ │ │ ├── test │ │ │ │ └── kotlin │ │ │ │ │ └── _package_ │ │ │ │ │ └── config │ │ │ │ │ └── EmbeddedKafka.kt.ejs │ │ │ │ └── main │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── broker │ │ │ │ ├── KafkaProducer.kt.ejs │ │ │ │ ├── KafkaConsumer_imperative.kt.ejs │ │ │ │ └── KafkaConsumer_reactive.kt.ejs │ │ ├── spring-data-mongodb │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── config │ │ │ │ └── EmbeddedMongo.kt.ejs │ │ ├── feign-client │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── client │ │ │ │ ├── OAuthIdpTokenResponseDTO.kt.ejs │ │ │ │ ├── OAuth2InterceptedFeignConfiguration.kt.ejs │ │ │ │ └── UserFeignClientInterceptor_jwt.kt.ejs │ │ ├── spring-cache │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── config │ │ │ │ └── EmbeddedRedis.kt.ejs │ │ ├── spring-data-neo4j │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── config │ │ │ │ └── EmbeddedNeo4j.kt.ejs │ │ ├── spring-data-relational │ │ │ └── src │ │ │ │ ├── test │ │ │ │ └── kotlin │ │ │ │ │ └── _package_ │ │ │ │ │ ├── config │ │ │ │ │ ├── EmbeddedSQL.kt.ejs │ │ │ │ │ └── SqlTestContainer.kt.ejs │ │ │ │ │ └── repository │ │ │ │ │ └── timezone │ │ │ │ │ └── DateTimeWrapperRepository.kt.ejs │ │ │ │ └── main │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── _entityPackage_ │ │ │ │ ├── domain │ │ │ │ ├── relationship_validators.ejs │ │ │ │ └── _persistClass_.kt.jhi.jakarta_lifecycle_events.ejs │ │ │ │ └── repository │ │ │ │ └── _entityClass_Repository_r2dbc.kt.ejs │ │ ├── gateway │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── web │ │ │ │ └── rest │ │ │ │ └── vm │ │ │ │ └── RouteVM.kt.ejs │ │ ├── spring-data-couchbase │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── config │ │ │ │ └── EmbeddedCouchbase.kt.ejs │ │ ├── spring-data-elasticsearch │ │ │ └── src │ │ │ │ └── test │ │ │ │ └── kotlin │ │ │ │ └── _package_ │ │ │ │ └── config │ │ │ │ └── EmbeddedElasticsearch.kt.ejs │ │ └── spring-websocket │ │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── _package_ │ │ │ └── web │ │ │ └── websocket │ │ │ └── dto │ │ │ └── ActivityDTO.kt.ejs │ ├── generator.spec.js │ └── kotlin-constants.js └── spring-boot-v2 │ ├── index.js │ ├── command.js │ ├── __snapshots__ │ └── generator.spec.js.snap │ ├── templates │ └── src │ │ └── main │ │ └── kotlin │ │ └── _package_ │ │ ├── config │ │ └── RestTemplateConfiguration.kt.ejs │ │ ├── security │ │ └── oauth2 │ │ │ ├── JwtGrantedAuthorityConverter.kt.ejs │ │ │ └── SimplePrincipalExtractor.kt.ejs │ │ ├── client │ │ └── OAuth2UserClientFeignConfiguration.kt.ejs │ │ └── web │ │ └── rest │ │ └── ClientForwardController.kt.ejs │ └── generator.spec.js ├── logo-khipster.png ├── .lintstagedrc.cjs ├── .blueprint ├── generate-sample │ ├── support │ │ ├── index.mjs │ │ └── workflow-samples.mjs │ ├── index.mjs │ └── templates │ │ ├── _supporting-samples │ │ ├── 01-non-updatable-entity.jdl │ │ ├── entities.jdl │ │ ├── cyclic.jdl │ │ ├── 02-authority-relationship.jdl │ │ ├── .jhipster │ │ │ ├── EntityWithDTO.json │ │ │ ├── EntityWithPaginationAndDTO.json │ │ │ ├── EntityWithServiceImplAndDTO.json │ │ │ ├── EntityWithServiceClassAndPagination.json │ │ │ ├── EntityWithServiceImplAndPagination.json │ │ │ ├── EntityWithServiceClassPaginationAndDTO.json │ │ │ ├── EntityWithServiceImplPaginationAndDTO.json │ │ │ ├── Genre.json │ │ │ ├── Artist.json │ │ │ ├── MicroserviceLabel.json │ │ │ ├── Track.json │ │ │ ├── MapsIdParentEntityWithoutDTO.json │ │ │ ├── MapsIdParentEntityWithDTO.json │ │ │ ├── Label.json │ │ │ ├── MapsIdUserProfileWithDTO.json │ │ │ ├── MapsIdGrandchildEntityWithoutDTO.json │ │ │ ├── MapsIdGrandchildEntityWithDTO.json │ │ │ ├── EmbeddedOperation.json │ │ │ ├── FieldTestEnumWithValue.json │ │ │ ├── MicroserviceOperation.json │ │ │ ├── Operation.json │ │ │ ├── MapsIdChildEntityWithDTO.json │ │ │ ├── MapsIdChildEntityWithoutDTO.json │ │ │ ├── CassBankAccount.json │ │ │ ├── Album.json │ │ │ ├── Place.json │ │ │ └── Division.json │ │ ├── custom-domain.jdl │ │ └── user-relationships.jdl │ │ ├── react.js │ │ ├── angular.js │ │ ├── _jdl-samples │ │ └── webflux-psql │ │ │ └── webflux-psql.jdl │ │ ├── _workflow-samples │ │ └── react.json │ │ └── _json-samples │ │ ├── ng-mariadb-oauth2-sass-infinispan │ │ └── .yo-rc.json │ │ ├── webflux-nodb-oauth2 │ │ └── .yo-rc.json │ │ ├── react-noi18n-es-ws-gradle-session │ │ └── .yo-rc.json │ │ ├── webflux-gateway-jwt │ │ └── .yo-rc.json │ │ ├── webflux-couchbase-session │ │ └── .yo-rc.json │ │ ├── webflux-mongodb-es-session │ │ └── .yo-rc.json │ │ ├── ng-session-cassandra-fr │ │ └── .yo-rc.json │ │ ├── webflux-react │ │ └── .yo-rc.json │ │ ├── webflux-mongodb │ │ └── .yo-rc.json │ │ ├── ng-mariadb-oauth2-infinispan │ │ └── .yo-rc.json │ │ ├── webflux-couchbase │ │ └── .yo-rc.json │ │ ├── ng-gradle-mariadb-oauth2-infinispan │ │ └── .yo-rc.json │ │ ├── webflux-gradle-session-h2mem-es │ │ └── .yo-rc.json │ │ ├── webflux-psql │ │ └── .yo-rc.json │ │ ├── webflux-gateway-oauth2 │ │ └── .yo-rc.json │ │ ├── ng-neo4j │ │ └── .yo-rc.json │ │ ├── ms-ngx-gateway-consul │ │ └── .yo-rc.json │ │ ├── ms-micro-consul │ │ └── .yo-rc.json │ │ ├── ms-micro-eureka │ │ └── .yo-rc.json │ │ ├── webflux-mysql-kafka │ │ └── .yo-rc.json │ │ ├── ng-couchbase │ │ └── .yo-rc.json │ │ ├── app-sample-dev │ │ └── .yo-rc.json │ │ ├── ng-gradle-couchbase-search │ │ └── .yo-rc.json │ │ ├── webflux-mongodb-oauth2 │ │ └── .yo-rc.json │ │ ├── webflux-couchbase-es-oauth2 │ │ └── .yo-rc.json │ │ ├── ng-gradle-fr │ │ └── .yo-rc.json │ │ ├── ng-mysql-es-noi18n-mapsid │ │ └── .yo-rc.json │ │ ├── ms-micro-consul-jwt │ │ └── .yo-rc.json │ │ ├── ng-gradle-mysql-es-noi18n-mapsid │ │ └── .yo-rc.json │ │ ├── ms-ngx-gateway-eureka │ │ └── .yo-rc.json │ │ ├── ms-micro-consul-infinispan │ │ └── .yo-rc.json │ │ └── ms-ngx-gateway-consul-jwt │ │ └── .yo-rc.json ├── github-build-matrix │ ├── index.mjs │ └── command.mjs ├── synchronize │ ├── index.js │ └── command.js └── cli │ └── commands.mjs ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── workflows │ ├── generator.yml │ ├── release-drafter.yml │ ├── codeql-analysis.yml │ └── build-cache.yml └── release-drafter.yml ├── .prettierrc.yml ├── .prettierignore ├── .yo-resolve ├── NOTICE ├── test ├── templates │ ├── compose │ │ ├── 04-mongo │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ ├── mongodb.yml │ │ │ │ └── mongodb-cluster.yml │ │ ├── 03-psql │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ ├── elasticsearch.yml │ │ │ │ └── postgresql.yml │ │ ├── 08-monolith │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ ├── elasticsearch.yml │ │ │ │ ├── mysql.yml │ │ │ │ └── app.yml │ │ ├── 12-oracle │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ └── app.yml │ │ ├── 01-gateway │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ └── mysql.yml │ │ ├── 02-mysql │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ └── mysql.yml │ │ ├── 07-mariadb │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ └── mariadb.yml │ │ ├── 09-kafka │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ ├── mysql.yml │ │ │ │ └── kafka.yml │ │ ├── 05-cassandra │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ ├── cassandra-migration.yml │ │ │ │ ├── cassandra.yml │ │ │ │ └── cassandra-cluster.yml │ │ ├── 10-couchbase │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── docker │ │ │ │ ├── couchbase.yml │ │ │ │ └── couchbase-cluster.yml │ │ └── 11-mssql │ │ │ └── src │ │ │ └── main │ │ │ └── docker │ │ │ └── mssql.yml │ ├── .jhipster │ │ ├── Simple.json │ │ ├── Simple2.json │ │ └── Simple3.json │ ├── default-gateway │ │ ├── microservice1 │ │ │ └── .jhipster │ │ │ │ ├── Foo.json │ │ │ │ ├── Baz.json │ │ │ │ └── Bar.json │ │ └── .yo-rc.json │ ├── gateway-nodb │ │ ├── microservice1 │ │ │ └── .jhipster │ │ │ │ └── Foo.json │ │ └── .yo-rc.json │ ├── default-couchbase-search │ │ └── .yo-rc.json │ ├── noi18n │ │ └── .yo-rc.json │ ├── default │ │ └── .yo-rc.json │ ├── default-elasticsearch │ │ └── .yo-rc.json │ ├── reproducible │ │ ├── .jhipster │ │ │ └── Foo.json │ │ └── .yo-rc.json │ ├── psql-with-no-fake-data │ │ └── .yo-rc.json │ ├── export-jdl │ │ ├── .jhipster │ │ │ └── Country.json │ │ └── .yo-rc.json │ ├── entity-dto-suffixes │ │ └── .yo-rc.json │ ├── default-ng2 │ │ └── .yo-rc.json │ ├── mongodb-with-relations │ │ └── .yo-rc.json │ ├── default-microservice │ │ └── .yo-rc.json │ └── elasticsearch-microservice │ │ └── .yo-rc.json └── entities.js ├── vitest.test-setup.ts ├── cli ├── cli-customizations.cjs ├── package-json.mjs └── cli.cjs ├── vitest.config.ts ├── .editorconfig ├── eslint.config.js └── docker └── Dockerfile /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | lint-staged 2 | -------------------------------------------------------------------------------- /generators/detekt/resources/build.gradle: -------------------------------------------------------------------------------- 1 | // required by dependabot 2 | -------------------------------------------------------------------------------- /generators/kotlin/resources/build.gradle: -------------------------------------------------------------------------------- 1 | // required by dependabot 2 | -------------------------------------------------------------------------------- /generators/ktlint/resources/build.gradle: -------------------------------------------------------------------------------- 1 | // required by dependabot 2 | -------------------------------------------------------------------------------- /logo-khipster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhipster/jhipster-kotlin/HEAD/logo-khipster.png -------------------------------------------------------------------------------- /generators/kotlin/support/index.js: -------------------------------------------------------------------------------- 1 | export * from './constants.js'; 2 | export * from './files.js'; 3 | -------------------------------------------------------------------------------- /.lintstagedrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | '{,**/}*.{md,json,yml,js,cjs,mjs,ts,cts,mts}': ['prettier --write'], 3 | }; 4 | -------------------------------------------------------------------------------- /generators/detekt/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './generator.js'; 2 | export { default as command } from './command.js'; 3 | -------------------------------------------------------------------------------- /generators/kotlin/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './generator.js'; 2 | export { default as command } from './command.js'; 3 | -------------------------------------------------------------------------------- /generators/ktlint/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './generator.js'; 2 | export { default as command } from './command.js'; 3 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/support/index.mjs: -------------------------------------------------------------------------------- 1 | export * from './entities-by-type.mjs'; 2 | export * from './workflow-samples.mjs'; 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: sendilkumarn 2 | open_collective: generator-jhipster 3 | custom: https://www.jhipster.tech/sponsors/ 4 | -------------------------------------------------------------------------------- /generators/migration/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './generator.js'; 2 | export { default as command } from './command.js'; 3 | -------------------------------------------------------------------------------- /generators/spring-boot/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './generator.js'; 2 | export { default as command } from './command.js'; 3 | -------------------------------------------------------------------------------- /generators/ktlint/templates/.gitignore.jhi.ktlint.ejs: -------------------------------------------------------------------------------- 1 | # Ignore ktlint executable used by jhipster-kotlint:ktlint generator 2 | .ktlint 3 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './generator.js'; 2 | export { default as command } from './command.js'; 3 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/index.mjs: -------------------------------------------------------------------------------- 1 | export { default } from './generator.mjs'; 2 | export { default as command } from './command.mjs'; 3 | -------------------------------------------------------------------------------- /.blueprint/github-build-matrix/index.mjs: -------------------------------------------------------------------------------- 1 | export { default } from './generator.mjs'; 2 | export { default as command } from './command.mjs'; 3 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | printWidth: 140 2 | singleQuote: true 3 | tabWidth: 4 4 | useTabs: false 5 | arrowParens: avoid 6 | bracketSameLine: false 7 | -------------------------------------------------------------------------------- /generators/detekt/command.js: -------------------------------------------------------------------------------- 1 | import { asCommand } from 'generator-jhipster'; 2 | 3 | export default asCommand({ 4 | configs: {}, 5 | }); 6 | -------------------------------------------------------------------------------- /generators/kotlin/command.js: -------------------------------------------------------------------------------- 1 | import { asCommand } from 'generator-jhipster'; 2 | 3 | export default asCommand({ 4 | configs: {}, 5 | }); 6 | -------------------------------------------------------------------------------- /generators/migration/command.js: -------------------------------------------------------------------------------- 1 | import { asCommand } from 'generator-jhipster'; 2 | 3 | export default asCommand({ 4 | configs: {}, 5 | }); 6 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/01-non-updatable-entity.jdl: -------------------------------------------------------------------------------- 1 | @ChangelogDate(20230100000000) 2 | entity NonUpdatableEntity 3 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/react.js: -------------------------------------------------------------------------------- 1 | import { reactSamples } from '../support/workflow-samples.mjs'; 2 | 3 | export default reactSamples; 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | .git 4 | 5 | # blueprint rules: 6 | generators/**/templates/**/ 7 | test/**/templates/**/ 8 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/angular.js: -------------------------------------------------------------------------------- 1 | import { angularSamples } from '../support/workflow-samples.mjs'; 2 | 3 | export default angularSamples; 4 | -------------------------------------------------------------------------------- /.yo-resolve: -------------------------------------------------------------------------------- 1 | .blueprint/cli/commands.mjs 2 | .blueprint/generate-sample/** 3 | .github/workflows/samples.yml 4 | .prettierrc.yml skip 5 | README.md skip 6 | -------------------------------------------------------------------------------- /generators/kotlin/support/constants.js: -------------------------------------------------------------------------------- 1 | export const SERVER_MAIN_SRC_KOTLIN_DIR = 'src/main/kotlin/'; 2 | export const SERVER_TEST_SRC_KOTLIN_DIR = 'src/test/kotlin/'; 3 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | JHipster 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | For more information on the JHipster project, see https://www.jhipster.tech/ 5 | -------------------------------------------------------------------------------- /generators/kotlin/templates/.editorconfig.jhi.kotlin.ejs: -------------------------------------------------------------------------------- 1 | # Generated by jhipster-kotlin:kotlin generator 2 | [*.{kt,kts}] 3 | indent_size = 4 4 | ktlint_standard_no-wildcard-imports = disabled 5 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/command.js: -------------------------------------------------------------------------------- 1 | import { asCommand } from 'generator-jhipster'; 2 | 3 | export default asCommand({ 4 | options: {}, 5 | configs: {}, 6 | arguments: {}, 7 | }); 8 | -------------------------------------------------------------------------------- /generators/spring-boot/command.js: -------------------------------------------------------------------------------- 1 | import { asCommand } from 'generator-jhipster'; 2 | 3 | export default asCommand({ 4 | configs: {}, 5 | import: ['jhipster-kotlin:ktlint'], 6 | }); 7 | -------------------------------------------------------------------------------- /generators/kotlin/resources/gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [libraries] 2 | kotlin = { module = 'org.jetbrains.kotlin:kotlin-bom', version = '1.9.25' } 3 | 4 | mockito-kotlin = { module = 'org.mockito.kotlin:mockito-kotlin', version = '5.4.0' } 5 | -------------------------------------------------------------------------------- /generators/detekt/resources/gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [libraries] 2 | detekt-cli = { module = 'io.gitlab.arturbosch.detekt:detekt-cli', version = '1.23.8' } 3 | 4 | [plugins] 5 | detekt-gradle = { id = 'io.gitlab.arturbosch.detekt', version = '1.23.8' } 6 | -------------------------------------------------------------------------------- /test/templates/compose/04-mongo/src/main/docker/mongodb.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | msmongodb-mongodb: 4 | image: mongo:4.4.15 5 | ports: 6 | - "27017:27017" 7 | # volumes: 8 | # - ~/volumes/jhipster/msmongodb/mongodb/:/data/db/ 9 | -------------------------------------------------------------------------------- /vitest.test-setup.ts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath } from 'node:url'; 2 | import { defineDefaults } from 'generator-jhipster/testing'; 3 | 4 | defineDefaults({ 5 | blueprint: 'generator-jhipster-kotlin', 6 | blueprintPackagePath: fileURLToPath(new URL('./', import.meta.url)), 7 | }); 8 | -------------------------------------------------------------------------------- /cli/cli-customizations.cjs: -------------------------------------------------------------------------------- 1 | // This file will not be overwritten by generate-blueprint 2 | module.exports = { 3 | printLogo: async () => { 4 | const { printLogo } = await import('./logo.mjs'); 5 | return printLogo(); 6 | }, 7 | printBlueprintLogo: () => {}, 8 | }; 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Overview of the issue 2 | 3 | ## Motivation for or Use Case 4 | 5 | ## Reproduce the error 6 | 7 | ## Related issues 8 | 9 | ## Link to PR (if any) 10 | 11 | ## KHipster Version(s) 12 | 13 | - [] Checking this box is mandatory (this is just to show you read everything) 14 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/entities.jdl: -------------------------------------------------------------------------------- 1 | @ChangelogDate(20200804035352) 2 | entity MapstructExpressionTest { 3 | id Long 4 | 5 | name String 6 | 7 | @MapstructExpression("java(s.getName())") 8 | value String 9 | } 10 | 11 | dto MapstructExpressionTest with mapstruct 12 | -------------------------------------------------------------------------------- /generators/kotlin/support/files.js: -------------------------------------------------------------------------------- 1 | export const convertToKotlinFile = (file, replaceExtension = true) => { 2 | if (replaceExtension) { 3 | file = file.replace('.java', '.kt'); 4 | } 5 | return file.replace('src/main/java/', 'src/main/kotlin/').replace('src/test/java/', 'src/test/kotlin/'); 6 | }; 7 | -------------------------------------------------------------------------------- /generators/migration/__snapshots__/generator.spec.js.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html 2 | 3 | exports[`SubGenerator migration of kotlin JHipster blueprint > run > should succeed 1`] = ` 4 | { 5 | ".yo-rc.json": { 6 | "stateCleared": "modified", 7 | }, 8 | } 9 | `; 10 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/__snapshots__/generator.spec.js.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html 2 | 3 | exports[`SubGenerator spring-boot-v2 of kotlin JHipster blueprint > run > should succeed 1`] = ` 4 | { 5 | ".yo-rc.json": { 6 | "stateCleared": "modified", 7 | }, 8 | } 9 | `; 10 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/cyclic.jdl: -------------------------------------------------------------------------------- 1 | @ChangelogDate(20200905000100) 2 | entity CyclicA { 3 | name String 4 | } 5 | 6 | @ChangelogDate(20200905000200) 7 | entity CyclicB { 8 | name String 9 | } 10 | 11 | relationship ManyToMany { 12 | CyclicA{b required} to CyclicB{a required} 13 | } 14 | -------------------------------------------------------------------------------- /cli/package-json.mjs: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs'; 2 | import { dirname, join } from 'path'; 3 | import { fileURLToPath } from 'url'; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | export default JSON.parse(readFileSync(join(__dirname, '../package.json')).toString()); 9 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/02-authority-relationship.jdl: -------------------------------------------------------------------------------- 1 | @ChangelogDate(20230200000000) 2 | entity AuthorityRelationship { 3 | name String 4 | } 5 | 6 | @EntityReadAuthority(ROLE_USER) 7 | entity Authority {} 8 | 9 | relationship ManyToOne { 10 | AuthorityRelationship{authority} to Authority 11 | } 12 | -------------------------------------------------------------------------------- /generators/ktlint/resources/gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [libraries] 2 | ktlint-cli = { module = 'com.pinterest.ktlint:ktlint-cli', version = '1.5.0' } 3 | 4 | ktlint-maven = { module = 'com.github.gantsign.maven:ktlint-maven-plugin', version = '3.5.0' } 5 | 6 | [plugins] 7 | ktlint-gradle = { id = 'org.jlleitschuh.gradle.ktlint', version = '12.2.0' } 8 | -------------------------------------------------------------------------------- /test/templates/compose/03-psql/src/main/docker/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mspsql-elasticsearch: 4 | image: elasticsearch:2.4.6 5 | # volumes: 6 | # - ~/volumes/jhipster/mspsql/elasticsearch/:/usr/share/elasticsearch/data/ 7 | ports: 8 | - 9200:9200 9 | - 9300:9300 10 | -------------------------------------------------------------------------------- /test/templates/compose/08-monolith/src/main/docker/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | samplemysql-elasticsearch: 4 | image: elasticsearch:2.4.6 5 | # volumes: 6 | # - ~/volumes/jhipster/sampleMysql/elasticsearch/:/usr/share/elasticsearch/data/ 7 | ports: 8 | - 9200:9200 9 | - 9300:9300 10 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defaultExclude, defineConfig } from 'vitest/config'; 2 | 3 | export default defineConfig({ 4 | test: { 5 | pool: 'forks', 6 | hookTimeout: 20000, 7 | exclude: [...defaultExclude.filter(val => val !== '**/cypress/**'), '**/templates/**', '**/resources/**'], 8 | setupFiles: ['./vitest.test-setup.ts'], 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123735", 3 | "dto": "mapstruct", 4 | "entityTableName": "entity_with_dto", 5 | "fields": [{ "fieldName": "emma", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "no", 8 | "relationships": [], 9 | "service": "no" 10 | } 11 | -------------------------------------------------------------------------------- /test/templates/compose/03-psql/src/main/docker/postgresql.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mspsql-postgresql: 4 | image: postgres:14.5 5 | # volumes: 6 | # - ~/volumes/jhipster/mspsql/postgresql/:/var/lib/postgresql/ 7 | environment: 8 | - POSTGRES_USER=mspsql 9 | - POSTGRES_PASSWORD= 10 | ports: 11 | - 5432:5432 12 | -------------------------------------------------------------------------------- /generators/ktlint/command.js: -------------------------------------------------------------------------------- 1 | import { asCommand } from 'generator-jhipster'; 2 | 3 | export default asCommand({ 4 | options: {}, 5 | configs: { 6 | skipKtlintFormat: { 7 | cli: { 8 | desc: 'Skip ktlintFormat', 9 | type: Boolean, 10 | }, 11 | scope: 'generator', 12 | }, 13 | }, 14 | arguments: {}, 15 | }); 16 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithPaginationAndDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123743", 3 | "dto": "mapstruct", 4 | "entityTableName": "entity_with_pagination_and_dto", 5 | "fields": [{ "fieldName": "lea", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "pagination", 8 | "relationships": [], 9 | "service": "no" 10 | } 11 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_jdl-samples/webflux-psql/webflux-psql.jdl: -------------------------------------------------------------------------------- 1 | application { 2 | config { 3 | reactive true 4 | testFrameworks [cypress] 5 | creationTimestamp 1617901618886 6 | jwtSecretKey "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=" 7 | } 8 | entities * 9 | } 10 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithServiceImplAndDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123742", 3 | "dto": "mapstruct", 4 | "entityTableName": "entity_with_service_impl_and_dto", 5 | "fields": [{ "fieldName": "louis", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "no", 8 | "relationships": [], 9 | "service": "serviceImpl" 10 | } 11 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-cassandra/src/test/kotlin/_package_/config/EmbeddedCassandra.kt.ejs: -------------------------------------------------------------------------------- 1 | package <%= packageName %>.config 2 | 3 | import java.lang.annotation.ElementType 4 | import java.lang.annotation.Retention 5 | import java.lang.annotation.RetentionPolicy 6 | import java.lang.annotation.Target 7 | 8 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | annotation class EmbeddedCassandra -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithServiceClassAndPagination.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123739", 3 | "dto": "no", 4 | "entityTableName": "entity_with_service_class_and_pagination", 5 | "fields": [{ "fieldName": "enzo", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "pagination", 8 | "relationships": [], 9 | "service": "serviceClass" 10 | } 11 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithServiceImplAndPagination.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123740", 3 | "dto": "no", 4 | "entityTableName": "entity_with_service_impl_and_pagination", 5 | "fields": [{ "fieldName": "hugo", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "pagination", 8 | "relationships": [], 9 | "service": "serviceImpl" 10 | } 11 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithServiceClassPaginationAndDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123744", 3 | "dto": "mapstruct", 4 | "entityTableName": "entity_with_service_class_pagination_and_dto", 5 | "fields": [{ "fieldName": "lena", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "pagination", 8 | "relationships": [], 9 | "service": "serviceClass" 10 | } 11 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EntityWithServiceImplPaginationAndDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20160806123845", 3 | "dto": "mapstruct", 4 | "entityTableName": "entity_with_service_impl_pagination_and_dto", 5 | "fields": [{ "fieldName": "theo", "fieldType": "String" }], 6 | "fluentMethods": true, 7 | "pagination": "pagination", 8 | "relationships": [], 9 | "service": "serviceImpl" 10 | } 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | # We recommend you to keep these unchanged 10 | end_of_line = lf 11 | charset = utf-8 12 | trim_trailing_whitespace = true 13 | insert_final_newline = true 14 | 15 | # Change these settings to your own preference 16 | indent_style = space 17 | indent_size = 4 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /.github/workflows/generator.yml: -------------------------------------------------------------------------------- 1 | name: Generator 2 | on: [push, pull_request] 3 | permissions: 4 | contents: read 5 | jobs: 6 | check-npm-test: 7 | name: npm-test 8 | runs-on: ubuntu-latest 9 | timeout-minutes: 20 10 | steps: 11 | - uses: actions/checkout@v6 12 | - uses: actions/setup-node@v6 13 | with: 14 | node-version: 20 15 | cache: 'npm' 16 | - run: npm ci 17 | - run: npm run test 18 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/templates/src/main/kotlin/_package_/config/RestTemplateConfiguration.kt.ejs: -------------------------------------------------------------------------------- 1 | package <%= packageName %>.config 2 | 3 | import org.springframework.beans.factory.annotation.Qualifier 4 | import org.springframework.context.annotation.Bean 5 | import org.springframework.stereotype.Component 6 | import org.springframework.web.client.RestTemplate 7 | 8 | @Component 9 | class RestTemplateConfiguration { 10 | @Bean 11 | @Qualifier("restTemplate") 12 | fun restTemplate() = RestTemplate() 13 | } 14 | -------------------------------------------------------------------------------- /test/templates/compose/12-oracle/src/main/docker/app.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | oracle-mono-app: 4 | image: oracle-mono 5 | environment: 6 | - _JAVA_OPTIONS=-Xmx512m -Xms256m 7 | - SPRING_PROFILES_ACTIVE=prod,api-docs 8 | - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true 9 | - SPRING_DATASOURCE_URL=jdbc:oracle:thin:@oracle-mono-oracle:1521:oracle-mono 10 | - JHIPSTER_SLEEP=30 # gives time for other services to boot before the application 11 | ports: 12 | - 8080:8080 13 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | # branches to consider in the event; optional, defaults to all 6 | branches: 7 | - main 8 | 9 | jobs: 10 | update_release_draft: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Drafts your next Release notes as Pull Requests are merged into "master" 14 | - uses: release-drafter/release-drafter@v5 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/config/ReactorConfiguration.kt.ejs: -------------------------------------------------------------------------------- 1 | package <%= packageName %>.config 2 | 3 | import tech.jhipster.config.JHipsterConstants 4 | import org.springframework.context.annotation.Configuration 5 | import org.springframework.context.annotation.Profile 6 | import reactor.core.publisher.Hooks 7 | 8 | @Configuration 9 | @Profile("!" + JHipsterConstants.SPRING_PROFILE_PRODUCTION) 10 | class ReactorConfiguration { 11 | init { 12 | Hooks.onOperatorDebug() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/templates/compose/01-gateway/src/main/docker/mysql.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | jhgate-mysql: 4 | image: mysql:8.0.30 5 | # volumes: 6 | # - ~/volumes/jhipster/jhgate/mysql/:/var/lib/mysql/ 7 | environment: 8 | - - MYSQL_ALLOW_EMPTY_PASSWORD=yes 9 | - MYSQL_DATABASE=jhgate 10 | ports: 11 | - 3306:3306 12 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 13 | -------------------------------------------------------------------------------- /test/templates/compose/02-mysql/src/main/docker/mysql.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | msmysql-mysql: 4 | image: mysql:8.0.30 5 | # volumes: 6 | # - ~/volumes/jhipster/msmysql/mysql/:/var/lib/mysql/ 7 | environment: 8 | - - MYSQL_ALLOW_EMPTY_PASSWORD=yes 9 | - MYSQL_DATABASE=msmysql 10 | ports: 11 | - 3306:3306 12 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 13 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | # branches to consider in the event; optional, defaults to all 6 | branches: 7 | - master 8 | 9 | jobs: 10 | update_release_draft: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Drafts your next Release notes as Pull Requests are merged into "master" 14 | - uses: release-drafter/release-drafter@v6 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | -------------------------------------------------------------------------------- /test/templates/compose/07-mariadb/src/main/docker/mariadb.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | msmariadb-mariadb: 4 | image: mariadb:10.8.3 5 | # volumes: 6 | # - ~/volumes/jhipster/msmysql/mysql/:/var/lib/mysql/ 7 | environment: 8 | - - MYSQL_ALLOW_EMPTY_PASSWORD=yes 9 | - MYSQL_DATABASE=msmysql 10 | ports: 11 | - 3306:3306 12 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 13 | -------------------------------------------------------------------------------- /test/templates/compose/09-kafka/src/main/docker/mysql.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | samplekafka-mysql: 4 | image: mysql:8.0.30 5 | # volumes: 6 | # - ~/volumes/jhipster/sampleKafka/mysql/:/var/lib/mysql/ 7 | environment: 8 | - - MYSQL_ALLOW_EMPTY_PASSWORD=yes 9 | - MYSQL_DATABASE=samplekafka 10 | ports: 11 | - 3306:3306 12 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 13 | -------------------------------------------------------------------------------- /test/templates/.jhipster/Simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "fluentMethods": true, 3 | "relationships": [], 4 | "fields": [ 5 | { 6 | "fieldName": "simpleId", 7 | "fieldType": "Long", 8 | "javadoc": "The simple Id" 9 | }, 10 | { 11 | "fieldName": "simpleName", 12 | "fieldType": "String" 13 | } 14 | ], 15 | "changelogDate": "20160926101210", 16 | "entityTableName": "simple", 17 | "dto": "no", 18 | "pagination": "no", 19 | "service": "no" 20 | } 21 | -------------------------------------------------------------------------------- /test/templates/.jhipster/Simple2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fluentMethods": true, 3 | "relationships": [], 4 | "fields": [ 5 | { 6 | "fieldName": "simpleId", 7 | "fieldType": "Long", 8 | "javadoc": "The simple Id" 9 | }, 10 | { 11 | "fieldName": "simpleName", 12 | "fieldType": "String" 13 | } 14 | ], 15 | "changelogDate": "20160926101211", 16 | "entityTableName": "simple", 17 | "dto": "no", 18 | "pagination": "no", 19 | "service": "no" 20 | } 21 | -------------------------------------------------------------------------------- /test/templates/.jhipster/Simple3.json: -------------------------------------------------------------------------------- 1 | { 2 | "fluentMethods": true, 3 | "relationships": [], 4 | "fields": [ 5 | { 6 | "fieldName": "simpleId", 7 | "fieldType": "Long", 8 | "javadoc": "The simple Id" 9 | }, 10 | { 11 | "fieldName": "simpleName", 12 | "fieldType": "String" 13 | } 14 | ], 15 | "changelogDate": "20160926101212", 16 | "entityTableName": "simple", 17 | "dto": "no", 18 | "pagination": "no", 19 | "service": "no" 20 | } 21 | -------------------------------------------------------------------------------- /test/templates/compose/08-monolith/src/main/docker/mysql.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | samplemysql-mysql: 4 | image: mysql:8.0.30 5 | # volumes: 6 | # - ~/volumes/jhipster/sampleMysql/mysql/:/var/lib/mysql/ 7 | environment: 8 | - - MYSQL_ALLOW_EMPTY_PASSWORD=yes 9 | - MYSQL_DATABASE=samplemysql 10 | ports: 11 | - 3306:3306 12 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 13 | -------------------------------------------------------------------------------- /test/templates/compose/05-cassandra/src/main/docker/cassandra-migration.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mscassandra-cassandra-migration: 4 | environment: 5 | - CASSANDRA_CONTACT_POINT=mscassandra-cassandra 6 | - USER=docker-cassandra-migration 7 | # - DEBUG_LOG=1 # uncomment to show debug logs during the migration process 8 | build: 9 | context: . 10 | dockerfile: cassandra/Cassandra-Migration.Dockerfile 11 | volumes: 12 | - ../resources/config/cql:/cql:ro 13 | -------------------------------------------------------------------------------- /test/templates/compose/10-couchbase/src/main/docker/couchbase.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mscouchbase-couchbase: 4 | build: 5 | context: . 6 | dockerfile: couchbase/Couchbase.Dockerfile 7 | ports: 8 | - 8091:8091 9 | - 8092:8092 10 | - 8093:8093 11 | - 8094:8094 12 | - 11210:11210 13 | environment: 14 | - BUCKET=mscouchbase 15 | # volumes: 16 | # - ~/volumes/jhipster/mscouchbase/couchbase/:/opt/couchbase/var 17 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Genre.json: -------------------------------------------------------------------------------- 1 | { 2 | "applications": "*", 3 | "changelogDate": "20200417190823", 4 | "clientRootFolder": "", 5 | "dto": "no", 6 | "embedded": false, 7 | "entityTableName": "genre", 8 | "fields": [{ "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }], 9 | "fluentMethods": true, 10 | "jpaMetamodelFiltering": false, 11 | "name": "Genre", 12 | "pagination": "no", 13 | "readOnly": false, 14 | "relationships": [], 15 | "service": "no" 16 | } 17 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Artist.json: -------------------------------------------------------------------------------- 1 | { 2 | "applications": "*", 3 | "changelogDate": "20200417190723", 4 | "clientRootFolder": "", 5 | "dto": "no", 6 | "embedded": false, 7 | "entityTableName": "artist", 8 | "fields": [{ "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }], 9 | "fluentMethods": true, 10 | "jpaMetamodelFiltering": false, 11 | "name": "Artist", 12 | "pagination": "no", 13 | "readOnly": false, 14 | "relationships": [], 15 | "service": "no" 16 | } 17 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import globals from 'globals'; 2 | import prettier from 'eslint-plugin-prettier/recommended'; 3 | import jhipster from 'generator-jhipster/eslint'; 4 | // jhipster-needle-eslint-add-import - JHipster will add additional import here 5 | 6 | export default [ 7 | { 8 | languageOptions: { 9 | globals: { 10 | ...globals.node, 11 | }, 12 | }, 13 | }, 14 | { ignores: ['coverage/**'] }, 15 | jhipster.recommended, 16 | // jhipster-needle-eslint-add-config - JHipster will add additional config here 17 | prettier, 18 | ]; 19 | -------------------------------------------------------------------------------- /test/templates/compose/04-mongo/src/main/docker/mongodb-cluster.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | msmongodb-mongodb: 4 | image: mongo:4.4.15 5 | ports: 6 | - "27017:27017" 7 | command: mongos --configdb csvr/msmongodb-mongodb-config --bind_ip 0.0.0.0 8 | msmongodb-mongodb-node: 9 | build: 10 | context: . 11 | dockerfile: mongodb/MongoDB.Dockerfile 12 | command: mongod --shardsvr --replSet rs1 13 | msmongodb-mongodb-config: 14 | image: mongo:4.4.15 15 | command: mongod --configsvr --dbpath /data/db --replSet csvr 16 | -------------------------------------------------------------------------------- /test/templates/default-gateway/microservice1/.jhipster/Foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo", 3 | "fields": [ 4 | { 5 | "fieldName": "name", 6 | "fieldType": "String" 7 | } 8 | ], 9 | "relationships": [], 10 | "changelogDate": "20180905045309", 11 | "entityTableName": "foo", 12 | "dto": "mapstruct", 13 | "pagination": "pagination", 14 | "service": "serviceClass", 15 | "jpaMetamodelFiltering": true, 16 | "fluentMethods": true, 17 | "clientRootFolder": "test-root", 18 | "applications": "*", 19 | "microserviceName": "sampleMicroservice" 20 | } 21 | -------------------------------------------------------------------------------- /test/templates/gateway-nodb/microservice1/.jhipster/Foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo", 3 | "fields": [ 4 | { 5 | "fieldName": "name", 6 | "fieldType": "String" 7 | } 8 | ], 9 | "relationships": [], 10 | "changelogDate": "20180905045309", 11 | "entityTableName": "foo", 12 | "dto": "mapstruct", 13 | "pagination": "pagination", 14 | "service": "serviceClass", 15 | "jpaMetamodelFiltering": true, 16 | "fluentMethods": true, 17 | "clientRootFolder": "sampleMicroservice", 18 | "applications": "*", 19 | "microserviceName": "sampleMicroservice" 20 | } 21 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_workflow-samples/react.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | { 4 | "name": "react-default", 5 | "app-sample": "react-default", 6 | "entity": "sqlfull" 7 | }, 8 | { 9 | "name": "react-maven-h2mem-memcached", 10 | "app-sample": "react-maven-h2mem-memcached", 11 | "entity": "sql" 12 | }, 13 | { 14 | "name": "react-gradle-cassandra-session-redis", 15 | "app-sample": "react-gradle-cassandra-session-redis", 16 | "entity": "cassandra" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /test/templates/compose/09-kafka/src/main/docker/kafka.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | zookeeper: 4 | image: confluentinc/cp-zookeeper:7.2.1 5 | environment: 6 | ZOOKEEPER_CLIENT_PORT: 2181 7 | ZOOKEEPER_TICK_TIME: 2000 8 | ZOOKEEPER_SYNC_LIMIT: 2 9 | kafka: 10 | image: confluentinc/cp-kafka:7.2.1 11 | environment: 12 | KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 13 | KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 14 | KAFKA_BROKER_ID: 2 15 | KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 16 | ports: 17 | - 9092:9092 18 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/templates/src/main/kotlin/_package_/security/oauth2/JwtGrantedAuthorityConverter.kt.ejs: -------------------------------------------------------------------------------- 1 | package <%= packageName %>.security.oauth2 2 | 3 | import <%= packageName %>.security.extractAuthorityFromClaims 4 | import org.springframework.core.convert.converter.Converter 5 | import org.springframework.security.oauth2.jwt.Jwt 6 | import org.springframework.security.core.GrantedAuthority 7 | import org.springframework.stereotype.Component 8 | 9 | @Component 10 | class JwtGrantedAuthorityConverter: Converter> { 11 | override fun convert(jwt: Jwt) = extractAuthorityFromClaims(jwt.claims) 12 | } 13 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/custom-domain.jdl: -------------------------------------------------------------------------------- 1 | @ChangelogDate(20200804035400) 2 | @EntityPackage("app.custom") 3 | entity CustomPackageParent { 4 | parentName String 5 | } 6 | 7 | @ChangelogDate(20200804035401) 8 | @EntityPackage("app.child") 9 | entity CustomPackageChild { 10 | childName String 11 | } 12 | 13 | relationship OneToMany { 14 | CustomPackageParent to CustomPackageChild 15 | } 16 | 17 | relationship ManyToOne { 18 | CustomPackageChild to User with builtInEntity 19 | } 20 | 21 | dto CustomPackageParent, CustomPackageChild with mapstruct 22 | service CustomPackageParent, CustomPackageChild with serviceClass 23 | -------------------------------------------------------------------------------- /test/templates/default-gateway/microservice1/.jhipster/Baz.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Baz", 3 | "fields": [ 4 | { 5 | "fieldName": "name", 6 | "fieldType": "String" 7 | } 8 | ], 9 | "relationships": [], 10 | "changelogDate": "20180905045309", 11 | "entityTableName": "baz", 12 | "dto": "mapstruct", 13 | "pagination": "pagination", 14 | "service": "serviceClass", 15 | "jpaMetamodelFiltering": true, 16 | "fluentMethods": true, 17 | "clientRootFolder": "sampleMicroservice", 18 | "applications": "*", 19 | "microserviceName": "sampleMicroservice", 20 | "databaseType": "mongodb" 21 | } -------------------------------------------------------------------------------- /test/templates/default-gateway/microservice1/.jhipster/Bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bar", 3 | "fields": [ 4 | { 5 | "fieldName": "name", 6 | "fieldType": "String" 7 | } 8 | ], 9 | "relationships": [], 10 | "changelogDate": "20180905045309", 11 | "entityTableName": "bar", 12 | "dto": "mapstruct", 13 | "pagination": "pagination", 14 | "service": "serviceClass", 15 | "jpaMetamodelFiltering": true, 16 | "fluentMethods": true, 17 | "clientRootFolder": "sampleMicroservice", 18 | "applications": "*", 19 | "microserviceName": "sampleMicroservice", 20 | "searchEngine": "elasticsearch" 21 | } 22 | -------------------------------------------------------------------------------- /.blueprint/github-build-matrix/command.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('generator-jhipster').JHipsterCommandDefinition} 3 | */ 4 | const command = { 5 | configs: { 6 | samplesFolder: { 7 | description: 'Samples folder', 8 | cli: { 9 | type: String, 10 | }, 11 | scope: 'generator', 12 | }, 13 | samplesGroup: { 14 | description: 'Samples Group', 15 | argument: { 16 | type: String, 17 | }, 18 | default: 'samples', 19 | scope: 'generator', 20 | }, 21 | }, 22 | options: {}, 23 | }; 24 | 25 | export default command; 26 | -------------------------------------------------------------------------------- /generators/ktlint/internal/ktlint-worker.js: -------------------------------------------------------------------------------- 1 | import { execa } from 'execa'; 2 | 3 | export default async ({ ktlintExecutable, fileContents, cwd }) => { 4 | try { 5 | const { stdout } = await execa(ktlintExecutable, ['--log-level=none', '--format', '--stdin'], { 6 | input: fileContents, 7 | stdio: 'pipe', 8 | shell: false, 9 | stripFinalNewline: false, 10 | cwd, 11 | }); 12 | return { result: stdout }; 13 | } catch (error) { 14 | if (!error.stdout || !error.stderr) { 15 | return { error: `${error}` }; 16 | } 17 | return { result: error.stdout, info: error.stderr }; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MicroserviceLabel.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20150805124936", 3 | "dto": "no", 4 | "fields": [ 5 | { "fieldName": "label", "fieldType": "String", "fieldValidateRules": ["required", "minlength"], "fieldValidateRulesMinlength": "3" } 6 | ], 7 | "fluentMethods": true, 8 | "jpaMetamodelFiltering": true, 9 | "pagination": "pagination", 10 | "relationships": [ 11 | { 12 | "otherEntityName": "microserviceOperation", 13 | "otherEntityRelationshipName": "label", 14 | "ownerSide": false, 15 | "relationshipName": "operation", 16 | "relationshipType": "many-to-many" 17 | } 18 | ], 19 | "service": "serviceClass" 20 | } 21 | -------------------------------------------------------------------------------- /test/templates/compose/05-cassandra/src/main/docker/cassandra.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mscassandra-cassandra: 4 | image: cassandra:3.11.13 5 | # volumes: 6 | # - ~/volumes/jhipster/mscassandra/cassandra/:/var/lib/cassandra/data 7 | ports: 8 | - 7000:7000 9 | - 7001:7001 10 | - 7199:7199 11 | - 9042:9042 12 | - 9160:9160 13 | mscassandra-cassandra-migration: 14 | environment: 15 | - CASSANDRA_CONTACT_POINT=mscassandra-cassandra 16 | - CREATE_KEYSPACE_SCRIPT=create-keyspace.cql 17 | build: 18 | context: . 19 | dockerfile: cassandra/Cassandra.Dockerfile 20 | volumes: 21 | - ../resources/config/cql:/cql:ro 22 | -------------------------------------------------------------------------------- /test/templates/compose/10-couchbase/src/main/docker/couchbase-cluster.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mscouchbase-couchbase: 4 | build: 5 | context: . 6 | dockerfile: couchbase/Couchbase.Dockerfile 7 | ports: 8 | - 8091:8091 9 | - 8092:8092 10 | - 8093:8093 11 | - 8094:8094 12 | - 11210:11210 13 | environment: 14 | - TYPE=MASTER 15 | - BUCKET=mscouchbase 16 | mscouchbase-couchbase-node: 17 | build: 18 | context: . 19 | dockerfile: couchbase/Couchbase.Dockerfile 20 | environment: 21 | - TYPE=WORKER 22 | - BUCKET=mscouchbase 23 | - COUCHBASE_MASTER=mscouchbase-couchbase 24 | - AUTO_REBALANCE=false 25 | -------------------------------------------------------------------------------- /test/templates/default-couchbase-search/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleMysql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "websocket": "no", 10 | "databaseType": "couchbase", 11 | "devDatabaseType": "couchbase", 12 | "prodDatabaseType": "couchbase", 13 | "searchEngine": "couchbase", 14 | "buildTool": "maven", 15 | "enableTranslation": true, 16 | "nativeLanguage": "en", 17 | "languages": [ 18 | "en", 19 | "fr" 20 | ], 21 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 22 | "testFrameworks": [ 23 | "gatling" 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/templates/noi18n/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleNoi8n", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "clientFramework": "angular", 8 | "authenticationType": "session", 9 | "cacheProvider": "hazelcast", 10 | "enableHibernateCache": true, 11 | "websocket": "yes", 12 | "databaseType": "sql", 13 | "devDatabaseType": "h2Disk", 14 | "prodDatabaseType": "mysql", 15 | "searchEngine": "elasticsearch", 16 | "buildTool": "maven", 17 | "enableTranslation": false, 18 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 19 | "testFrameworks": [ 20 | "gatling" 21 | ], 22 | "blueprint": "generator-jhipster-kotlin" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/templates/default/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleMysql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "websocket": "no", 10 | "databaseType": "sql", 11 | "devDatabaseType": "h2Disk", 12 | "prodDatabaseType": "mysql", 13 | "searchEngine": "no", 14 | "buildTool": "maven", 15 | "enableTranslation": true, 16 | "nativeLanguage": "en", 17 | "languages": [ 18 | "en", 19 | "fr" 20 | ], 21 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 22 | "testFrameworks": [ 23 | "gatling" 24 | ], 25 | "blueprint": "generator-jhipster-kotlin" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/templates/compose/11-mssql/src/main/docker/mssql.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | msmssql-mssql: 4 | image: mcr.microsoft.com/mssql/server:2019-CU16-GDR1-ubuntu-20.04 5 | # volumes are not supported on macOS 6 | # volumes: 7 | # - ~/volumes/jhipster/tempdb/mssql/:/var/opt/mssql/data/ 8 | environment: 9 | - ACCEPT_EULA=Y 10 | - SA_PASSWORD=yourStrong(!)Password 11 | - MSSQL_DATABASE=msmssql 12 | - MSSQL_PID=Express 13 | - MSSQL_SLEEP=60 14 | ports: 15 | - 1433:1433 16 | command: /bin/bash -c '/opt/mssql/bin/sqlservr & echo "wait $$MSSQL_SLEEP sec for DB to start "; sleep $$MSSQL_SLEEP; /opt/mssql-tools/bin/sqlcmd -U sa -P $$SA_PASSWORD -d tempdb -q "EXIT(CREATE DATABASE $$MSSQL_DATABASE)"; wait;' 17 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Track.json: -------------------------------------------------------------------------------- 1 | { 2 | "applications": "*", 3 | "changelogDate": "20200417190923", 4 | "clientRootFolder": "", 5 | "dto": "no", 6 | "embedded": false, 7 | "entityTableName": "track", 8 | "fields": [{ "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }], 9 | "fluentMethods": true, 10 | "jpaMetamodelFiltering": false, 11 | "name": "Track", 12 | "pagination": "no", 13 | "readOnly": false, 14 | "relationships": [ 15 | { 16 | "otherEntityField": "name", 17 | "otherEntityName": "album", 18 | "otherEntityRelationshipName": "track", 19 | "relationshipName": "album", 20 | "relationshipType": "many-to-one" 21 | } 22 | ], 23 | "service": "no" 24 | } 25 | -------------------------------------------------------------------------------- /test/templates/default-elasticsearch/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "samplePsql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "websocket": "no", 10 | "databaseType": "sql", 11 | "devDatabaseType": "h2Disk", 12 | "prodDatabaseType": "postgresql", 13 | "searchEngine": "elasticsearch", 14 | "buildTool": "maven", 15 | "enableTranslation": true, 16 | "nativeLanguage": "en", 17 | "languages": [ 18 | "en", 19 | "fr" 20 | ], 21 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 22 | "testFrameworks": [ 23 | "gatling" 24 | ], 25 | "blueprint": "generator-jhipster-kotlin" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/templates/reproducible/.jhipster/Foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo", 3 | "fields": [ 4 | { 5 | "fieldName": "name", 6 | "fieldType": "String" 7 | }, 8 | { 9 | "fieldName": "age", 10 | "fieldType": "Integer" 11 | }, 12 | { 13 | "fieldName": "numberPatternRequired", 14 | "fieldType": "String", 15 | "fieldValidateRules": [ 16 | "pattern", 17 | "required" 18 | ], 19 | "fieldValidateRulesPattern": "^[0-9]+$", 20 | "fieldValidateRulesPatternJava": "^[0-9]+$" 21 | } 22 | ], 23 | "relationships": [], 24 | "changelogDate": "20180905045309", 25 | "entityTableName": "foo", 26 | "dto": "no", 27 | "pagination": "no", 28 | "service": "no" 29 | } 30 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdParentEntityWithoutDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20190117074315", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "no", 6 | "entityTableName": "maps_id_parent_wo_dto", 7 | "fields": [{ "fieldName": "name", "fieldType": "String" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "otherEntityName": "mapsIdChildEntityWithoutDTO", 14 | "otherEntityRelationshipName": "mapsIdParentEntityWithoutDTO", 15 | "ownerSide": false, 16 | "relationshipName": "mapsIdChildEntityWithoutDTO", 17 | "relationshipType": "one-to-one" 18 | } 19 | ], 20 | "searchEngine": "no", 21 | "service": "no" 22 | } 23 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ${AnsiColor.GREEN}██╗ ██╗${AnsiColor.BRIGHT_YELLOW}██╗ ██╗██╗██████╗ ███████╗████████╗███████╗██████╗ 2 | ${AnsiColor.GREEN}██║ ██╔╝${AnsiColor.BRIGHT_YELLOW}██║ ██║██║██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗ 3 | ${AnsiColor.GREEN}█████╔╝ ${AnsiColor.BRIGHT_YELLOW}███████║██║██████╔╝███████╗ ██║ █████╗ ██████╔╝ 4 | ${AnsiColor.GREEN}██╔═██╗ ${AnsiColor.BRIGHT_YELLOW}██╔══██║██║██╔═══╝ ╚════██║ ██║ ██╔══╝ ██╔══██╗ 5 | ${AnsiColor.GREEN}██║ ██╗${AnsiColor.BRIGHT_YELLOW}██║ ██║██║██║ ███████║ ██║ ███████╗██║ ██║ 6 | ${AnsiColor.GREEN}╚═╝ ╚═╝${AnsiColor.BRIGHT_YELLOW}╚═╝ ╚═╝╚═╝╚═╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ 7 | 8 | ${AnsiColor.BRIGHT_BLUE}:: KHipster 🤓 :: Running Spring Boot ${spring-boot.version} :: with awesome kotlin 9 | :: https://www.khipster.dev ::${AnsiColor.DEFAULT} 10 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdParentEntityWithDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20190117075042", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "mapstruct", 6 | "entityTableName": "maps_id_parent_with_dto", 7 | "fields": [{ "fieldName": "name", "fieldType": "String" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "otherEntityName": "mapsIdChildEntityWithDTO", 14 | "otherEntityRelationshipName": "mapsIdParentEntityWithDTO", 15 | "ownerSide": false, 16 | "relationshipName": "mapsIdChildEntityWithDTO", 17 | "relationshipType": "one-to-one" 18 | } 19 | ], 20 | "searchEngine": "no", 21 | "service": "serviceImpl" 22 | } 23 | -------------------------------------------------------------------------------- /test/templates/psql-with-no-fake-data/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleMysql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "websocket": "no", 10 | "databaseType": "sql", 11 | "devDatabaseType": "h2Disk", 12 | "prodDatabaseType": "postgresql", 13 | "skipFakeData": true, 14 | "searchEngine": "no", 15 | "buildTool": "maven", 16 | "enableTranslation": true, 17 | "nativeLanguage": "en", 18 | "languages": [ 19 | "en", 20 | "fr" 21 | ], 22 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 23 | "testFrameworks": [ 24 | "gatling" 25 | ] 26 | } 27 | } -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Label.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20200804163353", 3 | "clientRootFolder": "test-root", 4 | "dto": "no", 5 | "fields": [ 6 | { 7 | "fieldName": "labelName", 8 | "fieldType": "String", 9 | "fieldValidateRules": ["required", "minlength"], 10 | "fieldValidateRulesMinlength": "3" 11 | } 12 | ], 13 | "fluentMethods": true, 14 | "pagination": "pagination", 15 | "readOnly": true, 16 | "relationships": [ 17 | { 18 | "otherEntityName": "operation", 19 | "otherEntityRelationshipName": "label", 20 | "ownerSide": false, 21 | "relationshipName": "operation", 22 | "relationshipType": "many-to-many" 23 | } 24 | ], 25 | "service": "serviceClass" 26 | } 27 | -------------------------------------------------------------------------------- /test/templates/export-jdl/.jhipster/Country.json: -------------------------------------------------------------------------------- 1 | { 2 | "fluentMethods": true, 3 | "relationships": [ 4 | { 5 | "relationshipType": "one-to-one", 6 | "relationshipName": "region", 7 | "otherEntityName": "region", 8 | "otherEntityField": "id", 9 | "ownerSide": true, 10 | "otherEntityRelationshipName": "country" 11 | } 12 | ], 13 | "fields": [ 14 | { 15 | "fieldName": "countryId", 16 | "fieldType": "Long", 17 | "javadoc": "The country Id" 18 | }, 19 | { 20 | "fieldName": "countryName", 21 | "fieldType": "String" 22 | } 23 | ], 24 | "changelogDate": "20160926101210", 25 | "entityTableName": "country", 26 | "dto": "no", 27 | "pagination": "no", 28 | "service": "no" 29 | } 30 | -------------------------------------------------------------------------------- /test/templates/entity-dto-suffixes/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleMysql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "websocket": "no", 10 | "databaseType": "sql", 11 | "devDatabaseType": "h2Disk", 12 | "prodDatabaseType": "mysql", 13 | "searchEngine": "no", 14 | "buildTool": "maven", 15 | "enableTranslation": true, 16 | "nativeLanguage": "en", 17 | "languages": [ 18 | "en", 19 | "fr" 20 | ], 21 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 22 | "testFrameworks": [ 23 | "gatling" 24 | ], 25 | "entitySuffix": "XXX", 26 | "dtoSuffix": "YYY", 27 | "blueprint": "generator-jhipster-kotlin" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/templates/default-ng2/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleMysql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "enableHibernateCache": true, 10 | "websocket": "no", 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "prodDatabaseType": "mysql", 14 | "searchEngine": "no", 15 | "buildTool": "maven", 16 | "enableTranslation": true, 17 | "nativeLanguage": "en", 18 | "languages": [ 19 | "en", 20 | "fr" 21 | ], 22 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 23 | "clientFramework": "angular", 24 | "testFrameworks": [ 25 | "gatling" 26 | ], 27 | "blueprint": "generator-jhipster-kotlin" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/templates/reproducible/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "baseName": "sampleMysql", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "enableHibernateCache": true, 10 | "websocket": "no", 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "prodDatabaseType": "mysql", 14 | "searchEngine": "no", 15 | "buildTool": "maven", 16 | "enableTranslation": true, 17 | "nativeLanguage": "en", 18 | "languages": [ 19 | "en", 20 | "fr" 21 | ], 22 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 23 | "clientFramework": "angular", 24 | "testFrameworks": [ 25 | "gatling" 26 | ], 27 | "blueprint": "generator-jhipster-kotlin" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdUserProfileWithDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20190117080030", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "mapstruct", 6 | "entityTableName": "maps_id_user_profile_with_dto", 7 | "fields": [{ "fieldName": "dateOfBirth", "fieldType": "Instant" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "id": true, 14 | "otherEntityField": "login", 15 | "otherEntityName": "user", 16 | "otherEntityRelationshipName": "mapsIdUserProfileWithDTO", 17 | "ownerSide": true, 18 | "relationshipName": "user", 19 | "relationshipType": "one-to-one" 20 | } 21 | ], 22 | "searchEngine": "no", 23 | "service": "serviceImpl" 24 | } 25 | -------------------------------------------------------------------------------- /test/templates/mongodb-with-relations/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "microservice", 4 | "baseName": "sampleMongodb", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "authenticationType": "session", 8 | "cacheProvider": "ehcache", 9 | "enableHibernateCache": true, 10 | "websocket": "no", 11 | "databaseType": "mongodb", 12 | "devDatabaseType": "mongodb", 13 | "prodDatabaseType": "mongodb", 14 | "searchEngine": "elasticsearch", 15 | "buildTool": "maven", 16 | "enableTranslation": true, 17 | "rememberMeKey": "2bb60a80889aa6e6767e9ccd8714982681152aa5", 18 | "languages": ["en", "fr"], 19 | "testFrameworks": [ 20 | "gatling" 21 | ], 22 | "blueprint": "generator-jhipster-kotlin" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.blueprint/synchronize/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 the original author or authors from the JHipster project. 3 | * 4 | * This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | * for more information. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License") 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * https://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | export { default } from './generator.js'; 20 | export { default as command } from './command.js'; 21 | -------------------------------------------------------------------------------- /generators/migration/generator.spec.js: -------------------------------------------------------------------------------- 1 | import { beforeAll, describe, expect, it } from 'vitest'; 2 | 3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing'; 4 | 5 | const SUB_GENERATOR = 'migration'; 6 | const SUB_GENERATOR_NAMESPACE = `jhipster-kotlin:${SUB_GENERATOR}`; 7 | 8 | describe('SubGenerator migration of kotlin JHipster blueprint', () => { 9 | describe('run', () => { 10 | beforeAll(async function () { 11 | await helpers 12 | .run(SUB_GENERATOR_NAMESPACE) 13 | .withJHipsterConfig() 14 | .withOptions({ 15 | ignoreNeedlesError: true, 16 | }) 17 | .withJHipsterLookup() 18 | .withParentBlueprintLookup(); 19 | }); 20 | 21 | it('should succeed', () => { 22 | expect(result.getStateSnapshot()).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdGrandchildEntityWithoutDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20220313234416", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "no", 6 | "entityTableName": "maps_id_grandchild_wo_dto", 7 | "fields": [{ "fieldName": "date", "fieldType": "Instant" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "id": true, 14 | "otherEntityField": "id", 15 | "otherEntityName": "mapsIdChildEntityWithoutDTO", 16 | "otherEntityRelationshipName": "mapsIdGrandchildEntityWithoutDTO", 17 | "ownerSide": true, 18 | "relationshipName": "mapsIdChildEntityWithoutDTO", 19 | "relationshipType": "one-to-one" 20 | } 21 | ], 22 | "searchEngine": "no", 23 | "service": "no" 24 | } 25 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdGrandchildEntityWithDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20220313234025", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "mapstruct", 6 | "entityTableName": "maps_id_grandchild_with_dto", 7 | "fields": [{ "fieldName": "date", "fieldType": "Instant" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "id": true, 14 | "otherEntityField": "id", 15 | "otherEntityName": "mapsIdChildEntityWithDTO", 16 | "otherEntityRelationshipName": "mapsIdGrandchildEntityWithDTO", 17 | "ownerSide": true, 18 | "relationshipName": "mapsIdChildEntityWithDTO", 19 | "relationshipType": "one-to-one" 20 | } 21 | ], 22 | "searchEngine": "no", 23 | "service": "serviceImpl" 24 | } 25 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/EmbeddedOperation.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20200804163351", 3 | "clientRootFolder": "test-root", 4 | "dto": "mapstruct", 5 | "embedded": true, 6 | "fields": [ 7 | { "fieldName": "date", "fieldType": "Instant", "fieldValidateRules": ["required"] }, 8 | { "fieldName": "description", "fieldType": "String" }, 9 | { "fieldName": "amount", "fieldType": "BigDecimal", "fieldValidateRules": ["required"] } 10 | ], 11 | "fluentMethods": true, 12 | "pagination": "infinite-scroll", 13 | "relationships": [ 14 | { 15 | "otherEntityField": "name", 16 | "otherEntityName": "documentBankAccount", 17 | "otherEntityRelationshipName": "embeddedOperation", 18 | "relationshipName": "documentBankAccount", 19 | "relationshipType": "many-to-one" 20 | } 21 | ], 22 | "service": "no" 23 | } 24 | -------------------------------------------------------------------------------- /test/templates/export-jdl/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "jhipsterVersion": "3.7.1", 4 | "baseName": "standard", 5 | "packageName": "com.mycompany.myapp", 6 | "packageFolder": "com/mycompany/myapp", 7 | "serverPort": "8080", 8 | "authenticationType": "session", 9 | "cacheProvider": "ehcache", 10 | "enableHibernateCache": true, 11 | "websocket": false, 12 | "databaseType": "sql", 13 | "devDatabaseType": "h2Memory", 14 | "prodDatabaseType": "postgresql", 15 | "searchEngine": false, 16 | "buildTool": "gradle", 17 | "rememberMeKey": "5f1100e7eae25e2abe32d7b2031ac1f2acc778d8", 18 | "applicationType": "monolith", 19 | "testFrameworks": [], 20 | "jhiPrefix": "jhi", 21 | "enableTranslation": true, 22 | "nativeLanguage": "en", 23 | "languages": [ 24 | "en" 25 | ], 26 | "skipClient": true, 27 | "skipServer": true, 28 | "blueprint": "generator-jhipster-kotlin" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/support/workflow-samples.mjs: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs'; 2 | 3 | const prepareSamples = samples => Object.fromEntries(samples.map(({ name, ...sample }) => [name, sample])); 4 | const addSamplesGroup = (samples, samplesGroup) => samples.map(sample => ({ ...sample, 'samples-group': samplesGroup })); 5 | 6 | const angularJson = readFileSync(new URL('../templates/_workflow-samples/angular.json', import.meta.url), 'utf8'); 7 | const angularWorkflowSamples = addSamplesGroup(JSON.parse(angularJson).include, 'angular'); 8 | 9 | const reactJson = readFileSync(new URL('../templates/_workflow-samples/react.json', import.meta.url), 'utf8'); 10 | const reactWorkflowSamples = addSamplesGroup(JSON.parse(reactJson).include, 'react'); 11 | 12 | export const workflowSamples = prepareSamples([...angularWorkflowSamples, ...reactWorkflowSamples]); 13 | export const angularSamples = prepareSamples(angularWorkflowSamples); 14 | export const reactSamples = prepareSamples(reactWorkflowSamples); 15 | -------------------------------------------------------------------------------- /test/templates/compose/08-monolith/src/main/docker/app.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | samplemysql-app: 4 | image: samplemysql 5 | environment: 6 | - SPRING_PROFILES_ACTIVE=prod,api-docs 7 | - SPRING_DATASOURCE_URL=jdbc:mysql://samplemysql-mysql:3306/samplemysql?useUnicode=true&characterEncoding=utf8&useSSL=false&createDatabaseIfNotExist=true 8 | - JHIPSTER_SLEEP=10 # gives time for the database to boot before the application 9 | ports: 10 | - 8080:8080 11 | samplemysql-mysql: 12 | image: <%= DOCKER_MYSQL %> 13 | # volumes: 14 | # - ~/volumes/jhipster/sampleMysql/mysql/:/var/lib/mysql/ 15 | environment: 16 | - - MYSQL_ALLOW_EMPTY_PASSWORD=yes 17 | - MYSQL_DATABASE=samplemysql 18 | ports: 19 | - 3306:3306 20 | command: mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp 21 | 22 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/FieldTestEnumWithValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "applications": "*", 3 | "changelogDate": "20200415193919", 4 | "clientRootFolder": "", 5 | "dto": "no", 6 | "embedded": false, 7 | "entityTableName": "entity_with_enums", 8 | "fields": [ 9 | { "fieldName": "myFieldA", "fieldType": "MyEnumA", "fieldValues": "AAA,BBB" }, 10 | { "fieldName": "myFieldB", "fieldType": "MyEnumB", "fieldValues": "AAA (aaa_aaa),BBB" }, 11 | { "fieldName": "myFieldC", "fieldType": "MyEnumC", "fieldValues": "AAA (aaa_aaa),BBB (b and b)" }, 12 | { "fieldName": "myFieldD", "fieldType": "MyEnumD", "fieldValues": "AAA (AAA),BBB (BBB)" }, 13 | { "fieldName": "myFieldE", "fieldType": "MyEnumE", "fieldValues": "AAA (aaa_aaa),BBB (BBB)" } 14 | ], 15 | "fluentMethods": true, 16 | "jpaMetamodelFiltering": false, 17 | "name": "FieldTestEnumWithValue", 18 | "pagination": "no", 19 | "readOnly": false, 20 | "relationships": [], 21 | "service": "no" 22 | } 23 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/security/AuthoritiesConstants.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.security 20 | 21 | const val ADMIN: String = "ROLE_ADMIN" 22 | const val USER: String = "ROLE_USER" 23 | const val ANONYMOUS: String = "ROLE_ANONYMOUS" 24 | -------------------------------------------------------------------------------- /test/entities.js: -------------------------------------------------------------------------------- 1 | export const entityWithCriteriaAndDto = { 2 | name: 'CriteriaAndDto', 3 | changelogDate: '20220129001000', 4 | jpaMetamodelFiltering: true, 5 | dto: 'mapstruct', 6 | service: 'serviceImpl', 7 | fields: [{ fieldName: 'criteriaName', fieldType: 'String', fieldValidateRules: ['required'] }], 8 | }; 9 | 10 | export const entityWithEnum = { 11 | name: 'EntityWithEnum', 12 | changelogDate: '20220129001100', 13 | fields: [{ fieldName: 'enumTom', fieldType: 'EnumFieldClass', fieldValues: 'ENUM_VALUE_1,ENUM_VALUE_2,ENUM_VALUE_3' }], 14 | }; 15 | 16 | export const entityWithBagRelationship = { 17 | name: 'RelationshipWithBagRelationship', 18 | changelogDate: '20220129001200', 19 | fields: [{ fieldName: 'twoName', fieldType: 'String' }], 20 | relationships: [ 21 | { 22 | relationshipName: 'relationship', 23 | otherEntityName: 'Simple', 24 | relationshipType: 'many-to-many', 25 | relationshipValidateRules: ['required'], 26 | }, 27 | ], 28 | }; 29 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/cucumber/src/test/kotlin/_package_/cucumber/CucumberIT.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.cucumber 20 | 21 | import <%= packageName %>.IntegrationTest 22 | 23 | import io.cucumber.junit.platform.engine.Cucumber 24 | 25 | @Cucumber 26 | @IntegrationTest 27 | class CucumberIT 28 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/web/rest/vm/KeyAndPasswordVM.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest.vm 20 | 21 | /** 22 | * View Model object for storing the user's key and password. 23 | */ 24 | class KeyAndPasswordVM(var key: String? = null, var newPassword: String? = null) 25 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/user-relationships.jdl: -------------------------------------------------------------------------------- 1 | entity User {} 2 | 3 | @ChangelogDate(20200804040000) 4 | entity UserMapsId { 5 | } 6 | 7 | @ChangelogDate(20200804050000) 8 | entity UserMapsIdDto { 9 | } 10 | 11 | @ChangelogDate(20200804060000) 12 | entity UserRelationship { 13 | } 14 | 15 | @ChangelogDate(20200804070000) 16 | entity UserRelationshipDto { 17 | } 18 | 19 | relationship OneToOne { 20 | UserMapsId to @Id User 21 | UserRelationship{oneToOne} to User 22 | UserRelationshipDto{oneToOneDto} to User 23 | UserRelationship{oneToOneMapsId} to UserMapsId{oneToOneMapsIdBack} 24 | } 25 | 26 | relationship ManyToOne { 27 | UserRelationship{manyToOne} to User 28 | UserRelationshipDto{manyToOneMapsId} to User 29 | UserRelationship{manyToOneMapsId} to UserMapsId{manyToOneMapsIdBack} 30 | } 31 | 32 | relationship ManyToMany { 33 | UserRelationship{manyToMany} to User 34 | UserRelationshipDto{manyToManyMapsId} to User 35 | UserRelationship{manyToManyMapsId} to UserMapsId{manyToManyMapsIdBack} 36 | } 37 | 38 | dto UserRelationshipDto with mapstruct 39 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/service/InvalidPasswordException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.service 20 | 21 | class InvalidPasswordException: RuntimeException("Incorrect password") { 22 | companion object { 23 | private const val serialVersionUID = 1L 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/service/EmailAlreadyUsedException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.service 20 | 21 | class EmailAlreadyUsedException: RuntimeException("Email is already in use!") { 22 | companion object { 23 | private const val serialVersionUID = 1L 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/service/UsernameAlreadyUsedException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.service 20 | 21 | class UsernameAlreadyUsedException: RuntimeException("Login name already used!") { 22 | companion object { 23 | private const val serialVersionUID = 1L 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/templates/default-microservice/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "promptValues": { 4 | "packageName": "com.mycompany.myapp" 5 | }, 6 | "jhipsterVersion": "4.14.0", 7 | "baseName": "sampleMicroservice", 8 | "packageName": "com.mycompany.myapp", 9 | "packageFolder": "com/mycompany/myapp", 10 | "serverPort": "8081", 11 | "authenticationType": "jwt", 12 | "cacheProvider": "hazelcast", 13 | "enableHibernateCache": false, 14 | "websocket": false, 15 | "databaseType": "sql", 16 | "devDatabaseType": "h2Disk", 17 | "prodDatabaseType": "mysql", 18 | "searchEngine": false, 19 | "messageBroker": false, 20 | "serviceDiscoveryType": "eureka", 21 | "buildTool": "maven", 22 | "enableSwaggerCodegen": false, 23 | "jwtSecretKey": "SECRET--50", 24 | "enableTranslation": false, 25 | "applicationType": "microservice", 26 | "testFrameworks": [], 27 | "jhiPrefix": "jhi", 28 | "clientPackageManager": "npm", 29 | "skipClient": true, 30 | "skipUserManagement": true, 31 | "blueprint": "generator-jhipster-kotlin" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-mariadb-oauth2-sass-infinispan/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "oauth2", 5 | "baseName": "sampleOauth2SassInfinispan", 6 | "buildTool": "maven", 7 | "cacheProvider": "infinispan", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "enableHibernateCache": true, 14 | "enableTranslation": false, 15 | "jhiPrefix": "myPrefix", 16 | "messageBroker": "no", 17 | "packageFolder": "tech/jhipster/sample", 18 | "packageName": "tech.jhipster.sample", 19 | "prodDatabaseType": "mariadb", 20 | "rememberMeKey": "448f9a67a8a292c4905a733ec22cc3b78e493c56", 21 | "searchEngine": "no", 22 | "serverPort": "8080", 23 | "serviceDiscoveryType": "no", 24 | "testFrameworks": ["gatling", "cypress"], 25 | "websocket": "no" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/templates/elasticsearch-microservice/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "promptValues": { 4 | "packageName": "com.mycompany.myapp" 5 | }, 6 | "jhipsterVersion": "4.14.0", 7 | "baseName": "sampleMicroservice", 8 | "packageName": "com.mycompany.myapp", 9 | "packageFolder": "com/mycompany/myapp", 10 | "serverPort": "8081", 11 | "authenticationType": "jwt", 12 | "cacheProvider": "hazelcast", 13 | "enableHibernateCache": false, 14 | "websocket": false, 15 | "databaseType": "sql", 16 | "devDatabaseType": "h2Disk", 17 | "prodDatabaseType": "mysql", 18 | "searchEngine": "elasticsearch", 19 | "messageBroker": false, 20 | "serviceDiscoveryType": "eureka", 21 | "buildTool": "maven", 22 | "enableSwaggerCodegen": false, 23 | "jwtSecretKey": "SECRET--50", 24 | "enableTranslation": false, 25 | "applicationType": "microservice", 26 | "testFrameworks": [], 27 | "jhiPrefix": "jhi", 28 | "clientPackageManager": "npm", 29 | "skipClient": true, 30 | "skipUserManagement": true, 31 | "blueprint": "generator-jhipster-kotlin" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-nodb-oauth2/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "oauth2", 5 | "baseName": "sampleWebfluxNodb", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "clientTheme": "none", 11 | "clientThemeVariant": "", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "no", 14 | "devDatabaseType": "no", 15 | "enableHibernateCache": false, 16 | "enableTranslation": true, 17 | "jhiPrefix": "jhi", 18 | "languages": ["en", "fr"], 19 | "nativeLanguage": "en", 20 | "packageFolder": "tech/jhipster/sample", 21 | "packageName": "tech.jhipster.sample", 22 | "prodDatabaseType": "no", 23 | "reactive": true, 24 | "searchEngine": "no", 25 | "serverPort": "8080", 26 | "serviceDiscoveryType": "no", 27 | "testFrameworks": ["gatling", "cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /generators/spring-boot/generator.spec.js: -------------------------------------------------------------------------------- 1 | import { beforeAll, describe, expect, it } from 'vitest'; 2 | 3 | import { entitiesServerSamples, defaultHelpers as helpers, result } from 'generator-jhipster/testing'; 4 | import { entityWithBagRelationship, entityWithCriteriaAndDto, entityWithEnum } from '../../test/entities.js'; 5 | 6 | describe('SubGenerator kotlin of kotlin JHipster blueprint', () => { 7 | describe('run', () => { 8 | beforeAll(async function () { 9 | await helpers 10 | .run('jhipster:spring-boot') 11 | .withJHipsterConfig({}, [...entitiesServerSamples, entityWithCriteriaAndDto, entityWithEnum, entityWithBagRelationship]) 12 | .withOptions({ 13 | ignoreNeedlesError: true, 14 | blueprints: 'kotlin', 15 | }) 16 | .withJHipsterLookup() 17 | .withParentBlueprintLookup() 18 | .withMockedGenerators(['jhipster-kotlin:ktlint']); 19 | }); 20 | 21 | it('should succeed', () => { 22 | expect(result.getStateSnapshot()).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/react-noi18n-es-ws-gradle-session/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "session", 5 | "baseName": "sampleReact", 6 | "buildTool": "gradle", 7 | "cacheProvider": "ehcache", 8 | "clientFramework": "react", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "enableHibernateCache": true, 14 | "enableTranslation": false, 15 | "jhiPrefix": "myPrefix", 16 | "messageBroker": "no", 17 | "packageFolder": "tech/jhipster/sample", 18 | "packageName": "tech.jhipster.sample", 19 | "prodDatabaseType": "postgresql", 20 | "rememberMeKey": "a5e93fdeb16e2ee2dc4a629b5dbdabb30f968e418dfc0483c53afdc695cfac96d06cf5c581cbefb93e3aaa241880857fcafe", 21 | "searchEngine": "elasticsearch", 22 | "serverPort": "8080", 23 | "serviceDiscoveryType": "no", 24 | "testFrameworks": ["cypress"], 25 | "websocket": "spring-websocket" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/kafka/src/test/kotlin/_package_/config/EmbeddedKafka.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import java.lang.annotation.ElementType 22 | import java.lang.annotation.Retention 23 | import java.lang.annotation.RetentionPolicy 24 | import java.lang.annotation.Target 25 | 26 | @Target(ElementType.TYPE) 27 | @Retention(RetentionPolicy.RUNTIME) 28 | annotation class EmbeddedKafka -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/web/rest/errors/FieldErrorVM.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest.errors 20 | 21 | import java.io.Serializable 22 | 23 | class FieldErrorVM( 24 | val objectName: String, 25 | val field: String, 26 | val message: String? 27 | ) : Serializable { 28 | companion object { 29 | private const val serialVersionUID = 1L 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-gateway-jwt/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "gateway", 4 | "authenticationType": "jwt", 5 | "baseName": "reactiveGateway", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "creationTimestamp": 1596513172471, 9 | "databaseType": "mongodb", 10 | "devDatabaseType": "mongodb", 11 | "enableHibernateCache": false, 12 | "enableTranslation": true, 13 | "jhiPrefix": "jhi", 14 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 15 | "languages": ["en", "es"], 16 | "nativeLanguage": "en", 17 | "packageFolder": "tech/jhipster/gateway", 18 | "packageName": "tech.jhipster.gateway", 19 | "prodDatabaseType": "mongodb", 20 | "reactive": true, 21 | "searchEngine": "no", 22 | "serverPort": "8080", 23 | "serviceDiscoveryType": "eureka", 24 | "testFrameworks": ["cypress"], 25 | "websocket": "no" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MicroserviceOperation.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20150805125054", 3 | "dto": "no", 4 | "fields": [ 5 | { "fieldName": "date", "fieldType": "Instant", "fieldValidateRules": ["required"] }, 6 | { "fieldName": "description", "fieldType": "String" }, 7 | { "fieldName": "amount", "fieldType": "BigDecimal", "fieldValidateRules": ["required"] } 8 | ], 9 | "fluentMethods": true, 10 | "pagination": "infinite-scroll", 11 | "relationships": [ 12 | { 13 | "otherEntityField": "name", 14 | "otherEntityName": "microserviceBankAccount", 15 | "otherEntityRelationshipName": "operation", 16 | "relationshipName": "bankAccount", 17 | "relationshipType": "many-to-one" 18 | }, 19 | { 20 | "otherEntityField": "label", 21 | "otherEntityName": "microserviceLabel", 22 | "otherEntityRelationshipName": "operation", 23 | "ownerSide": true, 24 | "relationshipName": "label", 25 | "relationshipType": "many-to-many" 26 | } 27 | ], 28 | "service": "no" 29 | } 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-mongodb/src/test/kotlin/_package_/config/EmbeddedMongo.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import java.lang.annotation.ElementType 22 | import java.lang.annotation.Retention 23 | import java.lang.annotation.RetentionPolicy 24 | import java.lang.annotation.Target 25 | 26 | @Target(ElementType.TYPE) 27 | @Retention(RetentionPolicy.RUNTIME) 28 | annotation class EmbeddedMongo -------------------------------------------------------------------------------- /generators/spring-boot/templates/feign-client/src/main/kotlin/_package_/client/OAuthIdpTokenResponseDTO.kt.ejs: -------------------------------------------------------------------------------- 1 | package <%= packageName %>.security.oauth2 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty 4 | import java.util.* 5 | 6 | open class OAuthIdpTokenResponseDTO( 7 | @JsonProperty("token_type") 8 | var tokenType: String? = null, 9 | 10 | var scope: String? = null, 11 | 12 | @JsonProperty("expires_in") 13 | var expiresIn: Long? = null, 14 | 15 | 16 | @JsonProperty("ext_expires_in") 17 | var extExpiresIn: Long? = null, 18 | 19 | @JsonProperty("expires_on") 20 | var expiresOn: Long? = null, 21 | 22 | @JsonProperty("not-before-policy") 23 | var notBefore: Long? = null, 24 | 25 | var resource: UUID? = null, 26 | 27 | @JsonProperty("access_token") 28 | var accessToken: String? = null, 29 | 30 | @JsonProperty("refresh_token") 31 | var refreshToken: String? = null, 32 | 33 | @JsonProperty("id_token") 34 | var idToken: String? = null, 35 | 36 | @JsonProperty("session_state") 37 | var sessionState: String? = null, 38 | 39 | @JsonProperty("refresh_expires_in") 40 | var refreshExpiresIn: String? = null 41 | ) 42 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-cache/src/test/kotlin/_package_/config/EmbeddedRedis.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | 22 | import java.lang.annotation.ElementType 23 | import java.lang.annotation.Retention 24 | import java.lang.annotation.RetentionPolicy 25 | import java.lang.annotation.Target 26 | 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | annotation class EmbeddedRedis 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-neo4j/src/test/kotlin/_package_/config/EmbeddedNeo4j.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import java.lang.annotation.ElementType 22 | import java.lang.annotation.Retention 23 | import java.lang.annotation.RetentionPolicy 24 | import java.lang.annotation.Target 25 | 26 | @Target(ElementType.TYPE) 27 | @Retention(RetentionPolicy.RUNTIME) 28 | annotation class EmbeddedNeo4j 29 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-relational/src/test/kotlin/_package_/config/EmbeddedSQL.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import java.lang.annotation.ElementType 22 | import java.lang.annotation.Retention 23 | import java.lang.annotation.RetentionPolicy 24 | import java.lang.annotation.Target 25 | 26 | @Target(ElementType.TYPE) 27 | @Retention(RetentionPolicy.RUNTIME) 28 | annotation class EmbeddedSQL 29 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-couchbase-session/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "session", 5 | "baseName": "sampleWebfluxCouchbaseSession", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "couchbase", 12 | "devDatabaseType": "couchbase", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "jhi", 16 | "languages": ["en", "fr"], 17 | "nativeLanguage": "en", 18 | "packageFolder": "tech/jhipster/sample", 19 | "packageName": "tech.jhipster.sample", 20 | "prodDatabaseType": "couchbase", 21 | "reactive": true, 22 | "rememberMeKey": "a5e93fdeb16e2ee2dc4a629b5dbdabb30f968e418dfc0483c53afdc695cfac96d06cf5c581cbefb93e3aaa241880857fcafe", 23 | "searchEngine": "no", 24 | "serverPort": "8080", 25 | "testFrameworks": ["gatling", "cypress"], 26 | "websocket": "no" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Operation.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20150805125055", 3 | "clientRootFolder": "test-root", 4 | "dto": "no", 5 | "fields": [ 6 | { "fieldName": "date", "fieldType": "Instant", "fieldValidateRules": ["required"] }, 7 | { "fieldName": "description", "fieldType": "String" }, 8 | { "fieldName": "amount", "fieldType": "BigDecimal", "fieldValidateRules": ["required"] } 9 | ], 10 | "fluentMethods": true, 11 | "pagination": "infinite-scroll", 12 | "relationships": [ 13 | { 14 | "otherEntityField": "name", 15 | "otherEntityName": "bankAccount", 16 | "otherEntityRelationshipName": "operation", 17 | "relationshipName": "bankAccount", 18 | "relationshipType": "many-to-one" 19 | }, 20 | { 21 | "otherEntityField": "labelName", 22 | "otherEntityName": "label", 23 | "otherEntityRelationshipName": "operation", 24 | "ownerSide": true, 25 | "relationshipName": "label", 26 | "relationshipType": "many-to-many" 27 | } 28 | ], 29 | "service": "no" 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-mongodb-es-session/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "session", 5 | "baseName": "sampleWebfluxMongodbEsSession", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "mongodb", 12 | "devDatabaseType": "mongodb", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "jhi", 16 | "languages": ["en", "fr"], 17 | "nativeLanguage": "en", 18 | "packageFolder": "tech/jhipster/sample", 19 | "packageName": "tech.jhipster.sample", 20 | "prodDatabaseType": "mongodb", 21 | "reactive": true, 22 | "rememberMeKey": "a5e93fdeb16e2ee2dc4a629b5dbdabb30f968e418dfc0483c53afdc695cfac96d06cf5c581cbefb93e3aaa241880857fcafe", 23 | "searchEngine": "elasticsearch", 24 | "serverPort": "8080", 25 | "testFrameworks": ["gatling", "cypress"], 26 | "websocket": "no" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /generators/ktlint/templates/gradle/ktlint.gradle.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | ktlint { 20 | //See more options: https://github.com/JLLeitschuh/ktlint-gradle#configuration 21 | version = "<%- javaDependencies['ktlint-cli'] %>" 22 | ignoreFailures = true 23 | filter { 24 | include("src/main/kotlin/**") 25 | include("src/test/kotlin/**") 26 | } 27 | } 28 | 29 | // Reformat code before compilation 30 | compileKotlin.dependsOn ktlintFormat 31 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/gateway/src/main/kotlin/_package_/web/rest/vm/RouteVM.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest.vm 20 | 21 | import org.springframework.cloud.client.ServiceInstance 22 | 23 | /** 24 | * View Model that stores a route managed by the Gateway. 25 | */ 26 | class RouteVM( 27 | var path: String? = null, 28 | var serviceId: String? = null, 29 | var serviceInstances: List? = null 30 | ) 31 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-couchbase/src/test/kotlin/_package_/config/EmbeddedCouchbase.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | 22 | import java.lang.annotation.ElementType 23 | import java.lang.annotation.Retention 24 | import java.lang.annotation.RetentionPolicy 25 | import java.lang.annotation.Target 26 | 27 | @Target(ElementType.TYPE) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | annotation class EmbeddedCouchbase 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-elasticsearch/src/test/kotlin/_package_/config/EmbeddedElasticsearch.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import java.lang.annotation.ElementType 22 | import java.lang.annotation.Retention 23 | import java.lang.annotation.RetentionPolicy 24 | import java.lang.annotation.Target 25 | 26 | @Target(ElementType.TYPE) 27 | @Retention(RetentionPolicy.RUNTIME) 28 | annotation class EmbeddedElasticsearch -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-session-cassandra-fr/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "session", 5 | "baseName": "sampleCassandra", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "cassandra", 12 | "devDatabaseType": "cassandra", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "jhi", 16 | "languages": ["en", "fr"], 17 | "messageBroker": "no", 18 | "nativeLanguage": "fr", 19 | "packageFolder": "tech/jhipster/sample", 20 | "packageName": "tech.jhipster.sample", 21 | "prodDatabaseType": "cassandra", 22 | "rememberMeKey": "a5e93fdeb16e2ee2dc4a629b5dbdabb30f968e418dfc0483c53afdc695cfac96d06cf5c581cbefb93e3aaa241880857fcafe", 23 | "searchEngine": "no", 24 | "serverPort": "8080", 25 | "serviceDiscoveryType": "no", 26 | "testFrameworks": ["gatling"], 27 | "websocket": "no" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-react/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleWebfluxMySql", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "react", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": true, 15 | "enableTranslation": true, 16 | "jhiPrefix": "jhi", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "nativeLanguage": "en", 20 | "packageFolder": "tech/jhipster/sample", 21 | "packageName": "tech.jhipster.sample", 22 | "reactive": true, 23 | "searchEngine": "no", 24 | "serverPort": "8080", 25 | "testFrameworks": ["gatling", "cypress"], 26 | "websocket": "no" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/cucumber/src/test/kotlin/_package_/cucumber/CucumberTestContextConfiguration.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://jhipster.github.io/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.cucumber 20 | 21 | import <%= packageName %>.IntegrationTest 22 | import io.cucumber.spring.CucumberContextConfiguration 23 | import org.springframework.test.context.web.WebAppConfiguration 24 | 25 | @CucumberContextConfiguration 26 | @IntegrationTest 27 | @WebAppConfiguration 28 | class CucumberTestContextConfiguration 29 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/kafka/src/main/kotlin/_package_/broker/KafkaProducer.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import org.springframework.cloud.stream.annotation.Output 22 | import org.springframework.messaging.MessageChannel 23 | 24 | interface KafkaSseProducer { 25 | 26 | companion object { 27 | const val CHANNELNAME = "binding-out-sse" 28 | } 29 | 30 | @Output(CHANNELNAME) 31 | fun output(): MessageChannel 32 | } 33 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-mongodb/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleWebfluxMongodb", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "mongodb", 12 | "devDatabaseType": "mongodb", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "jhi", 16 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 17 | "languages": ["en", "fr"], 18 | "nativeLanguage": "en", 19 | "packageFolder": "tech/jhipster/sample", 20 | "packageName": "tech.jhipster.sample", 21 | "prodDatabaseType": "mongodb", 22 | "reactive": true, 23 | "searchEngine": "no", 24 | "serverPort": "8080", 25 | "testFrameworks": ["gatling", "cypress"], 26 | "websocket": "no" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/kafka/src/main/kotlin/_package_/broker/KafkaConsumer_imperative.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import org.springframework.cloud.stream.annotation.Input 22 | import org.springframework.messaging.MessageChannel 23 | 24 | interface KafkaSseConsumer { 25 | 26 | companion object { 27 | const val CHANNELNAME = "binding-in-sse" 28 | } 29 | 30 | @Input(CHANNELNAME) 31 | fun input(): MessageChannel 32 | } 33 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/kafka/src/main/kotlin/_package_/broker/KafkaConsumer_reactive.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import org.springframework.cloud.stream.annotation.Input 22 | import org.springframework.messaging.MessageChannel 23 | 24 | interface KafkaSseConsumer { 25 | 26 | companion object { 27 | const val CHANNELNAME = "binding-in-sse" 28 | } 29 | 30 | @Input(CHANNELNAME) 31 | fun input(): MessageChannel 32 | } 33 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-relational/src/test/kotlin/_package_/config/SqlTestContainer.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import org.springframework.beans.factory.DisposableBean 22 | import org.springframework.beans.factory.InitializingBean 23 | import org.testcontainers.containers.JdbcDatabaseContainer 24 | 25 | interface SqlTestContainer: InitializingBean, DisposableBean { 26 | fun getTestContainer(): JdbcDatabaseContainer<*> 27 | } 28 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-mariadb-oauth2-infinispan/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "oauth2", 5 | "baseName": "sampleOauth2Infinispan", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "infinispan", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "mariadb", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": true, 18 | "enableTranslation": false, 19 | "entitySuffix": "", 20 | "jhiPrefix": "myPrefix", 21 | "messageBroker": "no", 22 | "otherModules": [], 23 | "packageFolder": "tech/jhipster/sample", 24 | "packageName": "tech.jhipster.sample", 25 | "prodDatabaseType": "mariadb", 26 | "searchEngine": "no", 27 | "serverPort": "8080", 28 | "serviceDiscoveryType": "no", 29 | "testFrameworks": ["gatling", "cypress"], 30 | "websocket": "no" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-websocket/src/main/kotlin/_package_/web/websocket/dto/ActivityDTO.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.websocket.dto 20 | 21 | import java.time.Instant 22 | 23 | /** 24 | * DTO for storing a user's activity. 25 | */ 26 | data class ActivityDTO( 27 | var sessionId: String? = null, 28 | var userLogin: String? = null, 29 | var ipAddress: String? = null, 30 | var page: String? = null, 31 | var time: Instant? = null 32 | ) 33 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-couchbase/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleWebfluxCouchbase", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "couchbase", 12 | "devDatabaseType": "couchbase", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "jhi", 16 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 17 | "languages": ["en", "fr"], 18 | "nativeLanguage": "en", 19 | "packageFolder": "tech/jhipster/sample", 20 | "packageName": "tech.jhipster.sample", 21 | "prodDatabaseType": "couchbase", 22 | "reactive": true, 23 | "searchEngine": "no", 24 | "serverPort": "8080", 25 | "testFrameworks": ["gatling", "cypress"], 26 | "websocket": "no" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdChildEntityWithDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20190117075155", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "mapstruct", 6 | "entityTableName": "maps_id_child_with_dto", 7 | "fields": [{ "fieldName": "date", "fieldType": "Instant" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "id": true, 14 | "otherEntityField": "id", 15 | "otherEntityName": "mapsIdParentEntityWithDTO", 16 | "otherEntityRelationshipName": "mapsIdChildEntityWithDTO", 17 | "ownerSide": true, 18 | "relationshipName": "mapsIdParentEntityWithDTO", 19 | "relationshipType": "one-to-one" 20 | }, 21 | { 22 | "otherEntityName": "mapsIdGrandchildEntityWithDTO", 23 | "otherEntityRelationshipName": "mapsIdChildEntityWithDTO", 24 | "ownerSide": false, 25 | "relationshipName": "mapsIdGrandchildEntityWithDTO", 26 | "relationshipType": "one-to-one" 27 | } 28 | ], 29 | "searchEngine": "no", 30 | "service": "serviceImpl" 31 | } 32 | -------------------------------------------------------------------------------- /generators/detekt/templates/gradle/detekt.gradle.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | detekt { 20 | input = files("src/main/kotlin") 21 | config = files("<%= detektConfigFile %>") 22 | reports { 23 | xml { 24 | required = true 25 | outputLocation = file("$buildDir/reports/detekt/detekt.xml") 26 | } 27 | } 28 | } 29 | 30 | sonarqube { 31 | properties { 32 | property "sonar.kotlin.detekt.reportPaths", detekt.reports.xml.outputLocation 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/MapsIdChildEntityWithoutDTO.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20190117074746", 3 | "clientRootFolder": "", 4 | "databaseType": "sql", 5 | "dto": "no", 6 | "entityTableName": "maps_id_child_wo_dto", 7 | "fields": [{ "fieldName": "date", "fieldType": "Instant" }], 8 | "fluentMethods": true, 9 | "jpaMetamodelFiltering": false, 10 | "pagination": "no", 11 | "relationships": [ 12 | { 13 | "id": true, 14 | "otherEntityField": "id", 15 | "otherEntityName": "mapsIdParentEntityWithoutDTO", 16 | "otherEntityRelationshipName": "mapsIdChildEntityWithoutDTO", 17 | "ownerSide": true, 18 | "relationshipName": "mapsIdParentEntityWithoutDTO", 19 | "relationshipType": "one-to-one" 20 | }, 21 | { 22 | "otherEntityName": "mapsIdGrandchildEntityWithoutDTO", 23 | "otherEntityRelationshipName": "mapsIdChildEntityWithoutDTO", 24 | "ownerSide": false, 25 | "relationshipName": "mapsIdGrandchildEntityWithoutDTO", 26 | "relationshipType": "one-to-one" 27 | } 28 | ], 29 | "searchEngine": "no", 30 | "service": "no" 31 | } 32 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-gradle-mariadb-oauth2-infinispan/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "oauth2", 5 | "baseName": "sampleGradleOauth2Infinispan", 6 | "blueprints": [], 7 | "buildTool": "gradle", 8 | "cacheProvider": "infinispan", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "mariadb", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": true, 18 | "enableTranslation": false, 19 | "entitySuffix": "", 20 | "jhiPrefix": "myPrefix", 21 | "messageBroker": "no", 22 | "otherModules": [], 23 | "packageFolder": "tech/jhipster/sample", 24 | "packageName": "tech.jhipster.sample", 25 | "prodDatabaseType": "mariadb", 26 | "searchEngine": "no", 27 | "serverPort": "8080", 28 | "serviceDiscoveryType": "no", 29 | "testFrameworks": ["gatling", "cypress"], 30 | "websocket": "no" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: 'Code scanning - action' 2 | 3 | on: 4 | push: 5 | pull_request: 6 | schedule: 7 | - cron: '0 1 * * 0' 8 | 9 | jobs: 10 | CodeQL-Build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout repository 15 | uses: actions/checkout@v6 16 | with: 17 | # We must fetch at least the immediate parents so that if this is 18 | # a pull request then we can checkout the head. 19 | fetch-depth: 2 20 | 21 | # If this run was triggered by a pull request event, then checkout 22 | # the head of the pull request instead of the merge commit. 23 | - run: git checkout HEAD^2 24 | if: ${{ github.event_name == 'pull_request' }} 25 | 26 | # Initializes the CodeQL tools for scanning. 27 | - name: Initialize CodeQL 28 | uses: github/codeql-action/init@v4 29 | with: 30 | languages: javascript 31 | 32 | - name: Autobuild 33 | uses: github/codeql-action/autobuild@v4 34 | 35 | - name: Perform CodeQL Analysis 36 | uses: github/codeql-action/analyze@v4 37 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-relational/src/test/kotlin/_package_/repository/timezone/DateTimeWrapperRepository.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.repository.timezone 20 | 21 | import org.springframework.data.jpa.repository.JpaRepository 22 | import org.springframework.stereotype.Repository 23 | 24 | /** 25 | * Spring Data JPA repository for the [DateTimeWrapper] entity. 26 | */ 27 | @Repository 28 | interface DateTimeWrapperRepository : JpaRepository 29 | -------------------------------------------------------------------------------- /test/templates/compose/05-cassandra/src/main/docker/cassandra-cluster.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | mscassandra-cassandra: 4 | build: 5 | context: . 6 | dockerfile: cassandra/Cassandra-Cluster.Dockerfile 7 | environment: 8 | - CASSANDRA_CONTACT_POINT=mscassandra-cassandra 9 | # volumes: 10 | # - ~/volumes/jhipster/mscassandra/cassandra/:/var/lib/cassandra/data 11 | ports: 12 | - 7000:7000 13 | - 7001:7001 14 | - 7199:7199 15 | - 9042:9042 16 | - 9160:9160 17 | mscassandra-cassandra-node: 18 | image: cassandra:3.11.13 19 | environment: 20 | - CASSANDRA_SEEDS=mscassandra-cassandra 21 | mscassandra-cassandra-migration: 22 | environment: 23 | - CASSANDRA_CONTACT_POINT=mscassandra-cassandra 24 | - USER=docker-cassandra-migration 25 | # - DEBUG_LOG=1 # uncomment to show debug logs during the migration process 26 | - CREATE_KEYSPACE_SCRIPT=create-keyspace-prod.cql 27 | build: 28 | context: . 29 | dockerfile: cassandra/Cassandra-Migration.Dockerfile 30 | volumes: 31 | - ../resources/config/cql:/cql:ro 32 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/generator.spec.js: -------------------------------------------------------------------------------- 1 | import { beforeAll, describe, expect, it } from 'vitest'; 2 | 3 | import { defaultHelpers as helpers, result } from 'generator-jhipster/testing'; 4 | 5 | const SUB_GENERATOR = 'spring-boot-v2'; 6 | const SUB_GENERATOR_NAMESPACE = `jhipster-kotlin:${SUB_GENERATOR}`; 7 | 8 | describe('SubGenerator spring-boot-v2 of kotlin JHipster blueprint', () => { 9 | describe('run', () => { 10 | beforeAll(async function () { 11 | await helpers 12 | .run(SUB_GENERATOR_NAMESPACE) 13 | .withJHipsterConfig() 14 | .withOptions({ 15 | ignoreNeedlesError: true, 16 | skipPriorities: ['writing', 'writingEntities'], 17 | }) 18 | .withSharedApplication({ 19 | dockerContainers: {}, 20 | javaDependencies: {}, 21 | springBootDependencies: {}, 22 | }) 23 | .withMockedSource() 24 | .withJHipsterLookup() 25 | .withParentBlueprintLookup(); 26 | }); 27 | 28 | it('should succeed', () => { 29 | expect(result.getStateSnapshot()).toMatchSnapshot(); 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/service/dto/PasswordChangeDTO.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.service.dto 20 | 21 | import java.io.Serializable 22 | 23 | /** 24 | * A DTO representing a password change required data - current and new password. 25 | */ 26 | data class PasswordChangeDTO(var currentPassword: String? = null, var newPassword: String? = null): Serializable{ 27 | companion object { 28 | private const val serialVersionUID = 1L 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-gradle-session-h2mem-es/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "session", 5 | "baseName": "sampleWebfluxH2mem", 6 | "buildTool": "gradle", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513272473, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Memory", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": true, 15 | "enableTranslation": true, 16 | "fakerSeed": "1", 17 | "jhiPrefix": "jhi", 18 | "languages": ["en", "fr"], 19 | "nativeLanguage": "en", 20 | "packageFolder": "tech/jhipster/sample", 21 | "packageName": "tech.jhipster.sample", 22 | "prodDatabaseType": "postgresql", 23 | "reactive": true, 24 | "rememberMeKey": "a5e93fdeb16e2ee2dc4a629b5dbdabb30f968e418dfc0483c53afdc695cfac96d06cf5c581cbefb93e3aaa241880857fcafe", 25 | "searchEngine": "elasticsearch", 26 | "serverPort": "8080", 27 | "testFrameworks": ["gatling", "cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-psql/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleWebfluxPsql", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": true, 15 | "enableTranslation": true, 16 | "jhiPrefix": "jhi", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "nativeLanguage": "en", 20 | "packageFolder": "tech/jhipster/sample", 21 | "packageName": "tech.jhipster.sample", 22 | "prodDatabaseType": "postgresql", 23 | "reactive": true, 24 | "searchEngine": "no", 25 | "serverPort": "8080", 26 | "testFrameworks": ["gatling", "cypress"], 27 | "websocket": "no" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/web/rest/errors/EmailAlreadyUsedException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest.errors 20 | 21 | @SuppressWarnings("java:S110") // Inheritance tree of classes should not be too deep 22 | class EmailAlreadyUsedException : 23 | BadRequestAlertException(EMAIL_ALREADY_USED_TYPE, "Email is already in use!", "userManagement", "emailexists") { 24 | 25 | companion object { 26 | private const val serialVersionUID = 1L 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/templates/gateway-nodb/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "promptValues": { 4 | "packageName": "com.mycompany.myapp", 5 | "nativeLanguage": "en" 6 | }, 7 | "jhipsterVersion": "5.3.0", 8 | "applicationType": "gateway", 9 | "baseName": "gway", 10 | "packageName": "com.mycompany.myapp", 11 | "packageFolder": "com/mycompany/myapp", 12 | "serverPort": "8080", 13 | "authenticationType": "jwt", 14 | "cacheProvider": "hazelcast", 15 | "enableHibernateCache": true, 16 | "websocket": false, 17 | "databaseType": "no", 18 | "searchEngine": false, 19 | "messageBroker": false, 20 | "serviceDiscoveryType": "eureka", 21 | "buildTool": "maven", 22 | "enableSwaggerCodegen": false, 23 | "jwtSecretKey": "MTBlZDY1OTk5Yjc2MjRkZDY3ZDkwZTE1ZWY1Nzg5MTQ0NWU0MjA4OTcxZDMyMTUzZTcxOGFhM2UwMWIyYjlkZmQ3OTljZTkwNThlYmViZDM0M2Y2OWFiM2JhNWY5ZDZkYzBhODg3ZDkwOGQyYmY1ZTFiYzFkNDhkNjhjZGFmNDE=", 24 | "clientFramework": "angular", 25 | "clientPackageManager": "npm", 26 | "testFrameworks": [], 27 | "jhiPrefix": "jhi", 28 | "enableTranslation": true, 29 | "nativeLanguage": "en", 30 | "languages": [ 31 | "en", 32 | "es" 33 | ], 34 | "blueprint": "generator-jhipster-kotlin" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/test/kotlin/_package_/config/WebConfigurerTestController.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import org.springframework.web.bind.annotation.GetMapping 22 | import org.springframework.web.bind.annotation.RestController 23 | 24 | @RestController 25 | class WebConfigurerTestController { 26 | 27 | @GetMapping("/api/test-cors") 28 | fun testCorsOnApiPath() = Unit 29 | 30 | @GetMapping("/test/test-cors") 31 | fun testCorsOnOtherPath() = Unit 32 | } 33 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/templates/src/main/kotlin/_package_/client/OAuth2UserClientFeignConfiguration.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://jhipster.github.io/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.client 20 | 21 | import java.io.IOException 22 | 23 | import org.springframework.context.annotation.Bean 24 | 25 | import feign.RequestInterceptor 26 | 27 | class OAuth2UserClientFeignConfiguration { 28 | 29 | @Bean(name = ["userFeignClientInterceptor"]) 30 | @Throws(IOException::class) 31 | fun getUserFeignClientInterceptor() = UserFeignClientInterceptor() 32 | } 33 | -------------------------------------------------------------------------------- /generators/spring-boot/kotlin-constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 the original author or authors from the JHipster project. 3 | * 4 | * This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | * for more information. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License") 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * https://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | import { JAVA_MAIN_RESOURCES_DIR, JAVA_SERVER_TEST_RESOURCES_DIR } from 'generator-jhipster'; 21 | 22 | const MAIN_DIR = 'src/main/'; 23 | const TEST_DIR = 'src/test/'; 24 | 25 | export const KOTLIN_MAIN_SRC_DIR = `${MAIN_DIR}kotlin/`; 26 | export const KOTLIN_TEST_SRC_DIR = `${TEST_DIR}kotlin/`; 27 | 28 | export const KOTLIN_TEST_RES_DIR = JAVA_SERVER_TEST_RESOURCES_DIR; 29 | export const KOTLIN_MAIN_RES_DIR = JAVA_MAIN_RESOURCES_DIR; 30 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/CassBankAccount.json: -------------------------------------------------------------------------------- 1 | { 2 | "angularJSSuffix": "mySuffix", 3 | "changelogDate": "20150805124839", 4 | "dto": "mapstruct", 5 | "fields": [ 6 | { "fieldName": "userId", "fieldType": "UUID" }, 7 | { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, 8 | { "fieldName": "bankNumber", "fieldType": "Integer" }, 9 | { "fieldName": "agencyNumber", "fieldType": "Long" }, 10 | { "fieldName": "lastOperationDuration", "fieldType": "Float" }, 11 | { "fieldName": "meanOperationDuration", "fieldType": "Double" }, 12 | { "fieldName": "balance", "fieldType": "BigDecimal", "fieldValidateRules": ["required"] }, 13 | { "fieldName": "lastOperationDate", "fieldType": "Date" }, 14 | { "fieldName": "active", "fieldType": "Boolean" }, 15 | { "fieldName": "picture", "fieldType": "byte[]", "fieldTypeBlobContent": "image", "fieldValidateRules": ["required"] }, 16 | { "fieldName": "operationsFile", "fieldType": "byte[]" }, 17 | { "fieldName": "accountType", "fieldType": "AccountTypeEnum", "fieldValues": "STANDARD,PREMIUM" } 18 | ], 19 | "fluentMethods": true, 20 | "pagination": "no", 21 | "service": "serviceImpl" 22 | } 23 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/templates/src/main/kotlin/_package_/security/oauth2/SimplePrincipalExtractor.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.security.oauth2 20 | 21 | import org.springframework.boot.autoconfigure.security.oauth2.resource.PrincipalExtractor 22 | 23 | class SimplePrincipalExtractor( 24 | private val oauth2PrincipalAttribute: String 25 | ) : PrincipalExtractor { 26 | 27 | override fun extractPrincipal(map: Map): Any = 28 | map.getOrDefault(oauth2PrincipalAttribute, "unknown") 29 | } 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-relational/src/main/kotlin/_package_/_entityPackage_/domain/relationship_validators.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | <%# Returns a string of all validator annotations for the entity relationships. -%> 20 | <% 21 | let result = ''; 22 | if (relationship.relationshipValidate) { 23 | const validators = []; 24 | if (relationship.relationshipRequired) { 25 | validators.push('@NotNull'); 26 | } 27 | result = validators.join('\n '); 28 | result += '\n'; 29 | } -%> 30 | <%- result -%> 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-gateway-oauth2/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "gateway", 4 | "authenticationType": "oauth2", 5 | "baseName": "reactiveGateway", 6 | "buildTool": "gradle", 7 | "cacheProvider": "no", 8 | "clientFramework": "react", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "mongodb", 12 | "devDatabaseType": "mongodb", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "jhi", 16 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 17 | "languages": ["en", "fr"], 18 | "nativeLanguage": "en", 19 | "packageFolder": "tech/jhipster/gateway", 20 | "packageName": "tech.jhipster.gateway", 21 | "prodDatabaseType": "mongodb", 22 | "reactive": true, 23 | "searchEngine": "no", 24 | "serverPort": "8080", 25 | "serviceDiscoveryType": "eureka", 26 | "testFrameworks": ["gatling", "cypress"], 27 | "websocket": "no" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/security/UserNotActivatedException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.security 20 | 21 | import org.springframework.security.core.AuthenticationException 22 | 23 | /** 24 | * This exception is thrown in case of a not activated user trying to authenticate. 25 | */ 26 | class UserNotActivatedException(message: String, t: Throwable? = null) : AuthenticationException(message, t) { 27 | companion object { 28 | private const val serialVersionUID = 1L 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-neo4j/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleNeo4jNoCache", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "neo4j", 12 | "devDatabaseType": "neo4j", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": false, 15 | "enableTranslation": true, 16 | "jhiPrefix": "jhi", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "messageBroker": "no", 20 | "nativeLanguage": "en", 21 | "packageFolder": "tech/jhipster/sample", 22 | "packageName": "tech.jhipster.sample", 23 | "prodDatabaseType": "neo4j", 24 | "searchEngine": "no", 25 | "serverPort": "8080", 26 | "serviceDiscoveryType": "no", 27 | "testFrameworks": ["cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /generators/kotlin/templates/src/main/kotlin/_package_/GeneratedByJHipster.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://jhipster.github.io/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %> 20 | 21 | import java.lang.annotation.ElementType 22 | import java.lang.annotation.Retention 23 | import java.lang.annotation.RetentionPolicy 24 | import java.lang.annotation.Target 25 | 26 | import jakarta.annotation.Generated 27 | 28 | @Generated(value= ["JHipster"], comments="Generated by JHipster <%= jhipsterVersion %>") 29 | @Retention(RetentionPolicy.SOURCE) 30 | @Target(ElementType.TYPE) 31 | annotation class GeneratedByJHipster 32 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-ngx-gateway-consul/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "gateway", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleDefault", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "enableHibernateCache": false, 14 | "enableTranslation": true, 15 | "jhiPrefix": "myPrefix", 16 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 17 | "languages": ["en", "fr"], 18 | "messageBroker": "no", 19 | "nativeLanguage": "en", 20 | "packageFolder": "tech/jhipster/sample", 21 | "packageName": "tech.jhipster.sample", 22 | "prodDatabaseType": "postgresql", 23 | "reactive": true, 24 | "searchEngine": "no", 25 | "serverPort": "8080", 26 | "serviceDiscoveryType": "consul", 27 | "testFrameworks": ["gatling"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-micro-consul/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "microservice", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleMicroserviceConsul", 6 | "buildTool": "maven", 7 | "cacheProvider": "hazelcast", 8 | "clientPackageManager": "npm", 9 | "creationTimestamp": 1596513172471, 10 | "databaseType": "sql", 11 | "devDatabaseType": "h2Disk", 12 | "enableHibernateCache": true, 13 | "enableTranslation": true, 14 | "jhiPrefix": "jhi", 15 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 16 | "languages": ["en", "fr"], 17 | "messageBroker": "no", 18 | "nativeLanguage": "en", 19 | "packageFolder": "tech/jhipster/sample", 20 | "packageName": "tech.jhipster.sample", 21 | "prodDatabaseType": "postgresql", 22 | "searchEngine": "no", 23 | "serverPort": "8081", 24 | "serviceDiscoveryType": "consul", 25 | "skipClient": true, 26 | "skipUserManagement": true, 27 | "testFrameworks": ["gatling"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-micro-eureka/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "microservice", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleMicroserviceEureka", 6 | "buildTool": "maven", 7 | "cacheProvider": "hazelcast", 8 | "clientPackageManager": "npm", 9 | "creationTimestamp": 1596513172471, 10 | "databaseType": "sql", 11 | "devDatabaseType": "h2Disk", 12 | "enableHibernateCache": true, 13 | "enableTranslation": true, 14 | "jhiPrefix": "jhi", 15 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 16 | "languages": ["en", "fr"], 17 | "messageBroker": "no", 18 | "nativeLanguage": "en", 19 | "packageFolder": "tech/jhipster/sample", 20 | "packageName": "tech.jhipster.sample", 21 | "prodDatabaseType": "postgresql", 22 | "searchEngine": "no", 23 | "serverPort": "8081", 24 | "serviceDiscoveryType": "eureka", 25 | "skipClient": true, 26 | "skipUserManagement": true, 27 | "testFrameworks": ["gatling"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-mysql-kafka/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleWebfluxMySqlKafka", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": true, 15 | "enableTranslation": true, 16 | "jhiPrefix": "jhi", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "messageBroker": "kafka", 20 | "nativeLanguage": "en", 21 | "packageFolder": "tech/jhipster/sample", 22 | "packageName": "tech.jhipster.sample", 23 | "prodDatabaseType": "mysql", 24 | "reactive": true, 25 | "searchEngine": "no", 26 | "serverPort": "8080", 27 | "testFrameworks": ["gatling", "cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-relational/src/main/kotlin/_package_/_entityPackage_/domain/_persistClass_.kt.jhi.jakarta_lifecycle_events.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | <%# 20 | This is a fragment file, it will be merged into to root template if available. 21 | EJS fragments will process % delimiter tags in template and & delimiter tags in the merge process. 22 | -%> 23 | <&_ if (fragment.classAdditionalFieldsMethodsSection) { -&> 24 | 25 | @PostLoad 26 | @PostPersist 27 | fun updateEntityState() { 28 | this.setIsPersisted() 29 | } 30 | 31 | <&_ } -&> 32 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-couchbase/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleCouchbaseNoCache", 6 | "buildTool": "maven", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "couchbase", 12 | "devDatabaseType": "couchbase", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": false, 15 | "enableTranslation": true, 16 | "jhiPrefix": "jhi", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "messageBroker": "no", 20 | "nativeLanguage": "en", 21 | "packageFolder": "tech/jhipster/sample", 22 | "packageName": "tech.jhipster.sample", 23 | "prodDatabaseType": "couchbase", 24 | "searchEngine": "no", 25 | "serverPort": "8080", 26 | "serviceDiscoveryType": "no", 27 | "testFrameworks": ["gatling", "cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/app-sample-dev/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "jhipsterSampleApplication", 6 | "buildTool": "maven", 7 | "cacheProvider": "ehcache", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "embeddableLaunchScript": false, 14 | "enableHibernateCache": true, 15 | "enableTranslation": true, 16 | "jhiPrefix": "myPrefix", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "messageBroker": "no", 20 | "nativeLanguage": "en", 21 | "packageFolder": "tech/jhipster/sample", 22 | "packageName": "tech.jhipster.sample", 23 | "prodDatabaseType": "postgresql", 24 | "searchEngine": "no", 25 | "serverPort": "8080", 26 | "serviceDiscoveryType": "no", 27 | "testFrameworks": ["gatling", "cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/cucumber/src/test/kotlin/_package_/cucumber/stepdefs/StepDefs.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.cucumber.stepdefs 20 | 21 | <%_ if (reactive) { _%> 22 | import org.springframework.test.web.reactive.server.WebTestClient 23 | <%_ } else { _%> 24 | import org.springframework.test.web.servlet.ResultActions 25 | <%_ } _%> 26 | 27 | abstract class StepDefs { 28 | <%_ if (reactive) { _%> 29 | protected var actions: WebTestClient.ResponseSpec? = null 30 | <%_ } else { _%> 31 | protected var actions: ResultActions? = null 32 | <%_ } _%> 33 | } 34 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/test/kotlin/_package_/config/AsyncSyncConfiguration.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%=packageName%>.config 20 | 21 | import org.springframework.context.annotation.Bean 22 | import org.springframework.context.annotation.Configuration 23 | 24 | import org.springframework.context.annotation.Primary 25 | import org.springframework.core.task.SyncTaskExecutor 26 | 27 | import java.util.concurrent.Executor 28 | 29 | @Configuration 30 | class AsyncSyncConfiguration { 31 | @Bean(name = ["taskExecutor"]) 32 | fun taskExecutor() = SyncTaskExecutor() 33 | } 34 | -------------------------------------------------------------------------------- /.blueprint/cli/commands.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 the original author or authors from the JHipster project. 3 | * 4 | * This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | * for more information. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License") 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * https://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | const defaultCommands = { 21 | 'generate-sample': { 22 | desc: 'Generate a test sample', 23 | blueprint: '@jhipster/jhipster-dev', 24 | }, 25 | 'github-build-matrix': { 26 | desc: 'Build a matrix of jobs for github actions', 27 | blueprint: '@jhipster/jhipster-dev', 28 | }, 29 | synchronize: { 30 | desc: 'Synchronize templates from generator-jhipster', 31 | blueprint: '@jhipster/jhipster-dev', 32 | }, 33 | }; 34 | 35 | export default defaultCommands; 36 | -------------------------------------------------------------------------------- /test/templates/default-gateway/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "promptValues": { 4 | "packageName": "com.mycompany.myapp", 5 | "nativeLanguage": "en" 6 | }, 7 | "jhipsterVersion": "5.3.0", 8 | "applicationType": "gateway", 9 | "baseName": "gway", 10 | "packageName": "com.mycompany.myapp", 11 | "packageFolder": "com/mycompany/myapp", 12 | "serverPort": "8080", 13 | "authenticationType": "jwt", 14 | "cacheProvider": "hazelcast", 15 | "enableHibernateCache": true, 16 | "websocket": false, 17 | "databaseType": "sql", 18 | "devDatabaseType": "h2Disk", 19 | "prodDatabaseType": "mysql", 20 | "searchEngine": false, 21 | "messageBroker": false, 22 | "serviceDiscoveryType": "eureka", 23 | "buildTool": "maven", 24 | "enableSwaggerCodegen": false, 25 | "jwtSecretKey": "MTBlZDY1OTk5Yjc2MjRkZDY3ZDkwZTE1ZWY1Nzg5MTQ0NWU0MjA4OTcxZDMyMTUzZTcxOGFhM2UwMWIyYjlkZmQ3OTljZTkwNThlYmViZDM0M2Y2OWFiM2JhNWY5ZDZkYzBhODg3ZDkwOGQyYmY1ZTFiYzFkNDhkNjhjZGFmNDE=", 26 | "clientFramework": "angular", 27 | "clientPackageManager": "npm", 28 | "testFrameworks": [], 29 | "jhiPrefix": "jhi", 30 | "enableTranslation": true, 31 | "nativeLanguage": "en", 32 | "languages": [ 33 | "en", 34 | "es" 35 | ], 36 | "blueprint": "generator-jhipster-kotlin" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-gradle-couchbase-search/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleCouchbaseNoCache", 6 | "buildTool": "gradle", 7 | "cacheProvider": "no", 8 | "clientFramework": "angular", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "couchbase", 12 | "devDatabaseType": "couchbase", 13 | "enableHibernateCache": false, 14 | "enableSwaggerCodegen": false, 15 | "enableTranslation": true, 16 | "jhiPrefix": "jhi", 17 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 18 | "languages": ["en", "fr"], 19 | "messageBroker": "no", 20 | "nativeLanguage": "en", 21 | "packageFolder": "tech/jhipster/sample", 22 | "packageName": "tech.jhipster.sample", 23 | "prodDatabaseType": "couchbase", 24 | "searchEngine": "couchbase", 25 | "serverPort": "8080", 26 | "serviceDiscoveryType": "no", 27 | "testFrameworks": ["gatling", "cypress"], 28 | "websocket": "no" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-mongodb-oauth2/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "oauth2", 5 | "baseName": "sampleWebfluxMongodbOauth2", 6 | "blueprints": [], 7 | "buildTool": "gradle", 8 | "cacheProvider": "no", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1580314672693, 13 | "databaseType": "mongodb", 14 | "devDatabaseType": "mongodb", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": false, 18 | "enableTranslation": true, 19 | "entitySuffix": "", 20 | "jhiPrefix": "jhi", 21 | "jhipsterVersion": "6.6.0", 22 | "languages": ["en", "fr"], 23 | "messageBroker": "no", 24 | "nativeLanguage": "en", 25 | "otherModules": [], 26 | "packageFolder": "tech/jhipster/sample", 27 | "packageName": "tech.jhipster.sample", 28 | "prodDatabaseType": "mongodb", 29 | "reactive": true, 30 | "searchEngine": "no", 31 | "serverPort": "8080", 32 | "serviceDiscoveryType": "no", 33 | "testFrameworks": ["gatling", "cypress"], 34 | "websocket": "no" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cli/cli.cjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { dirname, basename, join } = require('path'); 4 | const { version, bin } = require('../package.json'); 5 | 6 | // Get package name to use as namespace. 7 | // Allows blueprints to be aliased. 8 | const packagePath = dirname(__dirname); 9 | const packageFolderName = basename(packagePath); 10 | const devBlueprintPath = join(packagePath, '.blueprint'); 11 | const blueprint = packageFolderName.startsWith('jhipster-') ? `generator-${packageFolderName}` : packageFolderName; 12 | 13 | (async () => { 14 | const { runJHipster, done, logger } = await import('generator-jhipster/cli'); 15 | const executableName = Object.keys(bin)[0]; 16 | 17 | runJHipster({ 18 | executableName, 19 | executableVersion: version, 20 | defaultCommand: 'app', 21 | devBlueprintPath, 22 | blueprints: { 23 | [blueprint]: version, 24 | }, 25 | printBlueprintLogo: () => { 26 | console.log('===================== JHipster Kotlin ====================='); 27 | console.log(''); 28 | }, 29 | lookups: [{ packagePaths: [packagePath] }], 30 | ...require('./cli-customizations.cjs'), 31 | }).catch(done); 32 | 33 | process.on('unhandledRejection', up => { 34 | logger.error('Unhandled promise rejection at:'); 35 | logger.fatal(up); 36 | }); 37 | })(); 38 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/web/rest/errors/LoginAlreadyUsedException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest.errors 20 | 21 | import org.zalando.problem.Exceptional 22 | 23 | @SuppressWarnings("java:S110") // Inheritance tree of classes should not be too deep 24 | class LoginAlreadyUsedException : 25 | BadRequestAlertException(LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists") { 26 | 27 | override fun getCause(): Exceptional? = super.cause 28 | 29 | companion object { 30 | private const val serialVersionUID = 1L 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /generators/detekt/generator.spec.js: -------------------------------------------------------------------------------- 1 | import { beforeAll, describe, expect, it } from 'vitest'; 2 | 3 | import { fromMatrix, defaultHelpers as helpers, result } from 'generator-jhipster/testing'; 4 | 5 | const SUB_GENERATOR = 'detekt'; 6 | const SUB_GENERATOR_NAMESPACE = `jhipster-kotlin:${SUB_GENERATOR}`; 7 | 8 | describe('SubGenerator detekt of kotlin JHipster blueprint', () => { 9 | Object.entries(fromMatrix({ buildTool: ['maven', 'gradle'] })).forEach(([name, config]) => { 10 | describe(name, () => { 11 | beforeAll(async function () { 12 | await helpers 13 | .run(SUB_GENERATOR_NAMESPACE) 14 | .withJHipsterConfig(config) 15 | .withOptions({ 16 | ignoreNeedlesError: true, 17 | skipKtlintFormat: true, 18 | }) 19 | .withJHipsterLookup() 20 | .withMockedSource() 21 | .withParentBlueprintLookup(['generators', 'generators/*/generators']); 22 | }); 23 | 24 | it('should succeed', () => { 25 | expect(result.getStateSnapshot()).toMatchSnapshot(); 26 | }); 27 | 28 | it('should match source calls', () => { 29 | expect(result.sourceCallsArg).toMatchSnapshot(); 30 | }); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /generators/kotlin/generator.spec.js: -------------------------------------------------------------------------------- 1 | import { beforeAll, describe, expect, it } from 'vitest'; 2 | 3 | import { fromMatrix, defaultHelpers as helpers, result } from 'generator-jhipster/testing'; 4 | 5 | const SUB_GENERATOR = 'kotlin'; 6 | const SUB_GENERATOR_NAMESPACE = `jhipster-kotlin:${SUB_GENERATOR}`; 7 | 8 | describe('SubGenerator kotlin of kotlin JHipster blueprint', () => { 9 | Object.entries(fromMatrix({ buildTool: ['maven', 'gradle'] })).forEach(([name, config]) => { 10 | describe(name, () => { 11 | beforeAll(async function () { 12 | await helpers 13 | .run(SUB_GENERATOR_NAMESPACE) 14 | .withJHipsterConfig(config) 15 | .withOptions({ 16 | ignoreNeedlesError: true, 17 | skipKtlintFormat: true, 18 | }) 19 | .withJHipsterLookup() 20 | .withMockedSource() 21 | .withParentBlueprintLookup(['generators', 'generators/*/generators']); 22 | }); 23 | 24 | it('should succeed', () => { 25 | expect(result.getStateSnapshot()).toMatchSnapshot(); 26 | }); 27 | 28 | it('should match source calls', () => { 29 | expect(result.sourceCallsArg).toMatchSnapshot(); 30 | }); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /generators/ktlint/generator.spec.js: -------------------------------------------------------------------------------- 1 | import { beforeAll, describe, expect, it } from 'vitest'; 2 | 3 | import { fromMatrix, defaultHelpers as helpers, result } from 'generator-jhipster/testing'; 4 | 5 | const SUB_GENERATOR = 'ktlint'; 6 | const SUB_GENERATOR_NAMESPACE = `jhipster-kotlin:${SUB_GENERATOR}`; 7 | 8 | describe('SubGenerator kotlin of kotlin JHipster blueprint', () => { 9 | Object.entries(fromMatrix({ buildTool: ['maven', 'gradle'] })).forEach(([name, config]) => { 10 | describe(name, () => { 11 | beforeAll(async function () { 12 | await helpers 13 | .run(SUB_GENERATOR_NAMESPACE) 14 | .withJHipsterConfig(config) 15 | .withOptions({ 16 | ignoreNeedlesError: true, 17 | skipKtlintFormat: true, 18 | }) 19 | .withJHipsterLookup() 20 | .withMockedSource() 21 | .withParentBlueprintLookup(['generators', 'generators/*/generators']); 22 | }); 23 | 24 | it('should succeed', () => { 25 | expect(result.getStateSnapshot()).toMatchSnapshot(); 26 | }); 27 | 28 | it('should match source calls', () => { 29 | expect(result.sourceCallsArg).toMatchSnapshot(); 30 | }); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Album.json: -------------------------------------------------------------------------------- 1 | { 2 | "applications": "*", 3 | "changelogDate": "20200417191023", 4 | "clientRootFolder": "", 5 | "dto": "no", 6 | "embedded": false, 7 | "entityTableName": "album", 8 | "fields": [{ "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }], 9 | "fluentMethods": true, 10 | "jpaMetamodelFiltering": false, 11 | "name": "Album", 12 | "pagination": "no", 13 | "readOnly": false, 14 | "relationships": [ 15 | { 16 | "otherEntityField": "name", 17 | "otherEntityName": "artist", 18 | "otherEntityRelationshipName": "album", 19 | "ownerSide": true, 20 | "relationshipName": "artist", 21 | "relationshipType": "one-to-one" 22 | }, 23 | { 24 | "otherEntityField": "name", 25 | "otherEntityName": "genre", 26 | "otherEntityRelationshipName": "album", 27 | "ownerSide": true, 28 | "relationshipName": "genre", 29 | "relationshipType": "one-to-one" 30 | }, 31 | { 32 | "otherEntityName": "track", 33 | "otherEntityRelationshipName": "album", 34 | "relationshipName": "track", 35 | "relationshipType": "one-to-many" 36 | } 37 | ], 38 | "service": "no" 39 | } 40 | -------------------------------------------------------------------------------- /generators/ktlint/internal/ktlint-transform-using-threads.js: -------------------------------------------------------------------------------- 1 | import { passthrough } from 'p-transform'; 2 | import { Piscina } from 'piscina'; 3 | import { filterKtlintTransformFiles } from './ktlint-transform.js'; 4 | 5 | export { filterKtlintTransformFiles }; 6 | 7 | /** 8 | * Experimental transform using piscina to check performance. 9 | */ 10 | export const createKtlintTransform = function ({ ktlintExecutable, cwd, ignoreErrors } = {}) { 11 | const pool = new Piscina({ 12 | filename: new URL('../internal/ktlint-worker.js', import.meta.url).href, 13 | }); 14 | 15 | return passthrough( 16 | async file => { 17 | if (!filterKtlintTransformFiles(file)) { 18 | return; 19 | } 20 | const { result, error, info } = await pool.run({ ktlintExecutable, cwd, fileContents: file.contents.toString('utf8') }); 21 | if (result) { 22 | file.contents = Buffer.from(result); 23 | } 24 | if (info) { 25 | this?.log?.info?.(info.replaceAll('', file.relative)); 26 | } 27 | if (error) { 28 | if (!ignoreErrors) { 29 | throw new Error(error); 30 | } 31 | this?.log?.warn?.(error); 32 | } 33 | }, 34 | () => { 35 | pool.destroy(); 36 | }, 37 | ); 38 | }; 39 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/security/SpringSecurityAuditorAware.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.security 20 | 21 | import <%= packageName %>.config.SYSTEM_ACCOUNT 22 | 23 | import java.util.Optional 24 | 25 | import org.springframework.data.domain.AuditorAware 26 | import org.springframework.stereotype.Component 27 | 28 | /** 29 | * Implementation of [AuditorAware] based on Spring Security. 30 | */ 31 | @Component 32 | class SpringSecurityAuditorAware : AuditorAware { 33 | override fun getCurrentAuditor(): Optional = Optional.of(getCurrentUserLogin().orElse(SYSTEM_ACCOUNT)) 34 | } 35 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/webflux-couchbase-es-oauth2/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "oauth2", 5 | "baseName": "sampleWebfluxCouchbaseOauth2", 6 | "blueprints": [], 7 | "buildTool": "gradle", 8 | "cacheProvider": "no", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1580314672693, 13 | "databaseType": "couchbase", 14 | "devDatabaseType": "couchbase", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": false, 18 | "enableTranslation": true, 19 | "entitySuffix": "", 20 | "jhiPrefix": "jhi", 21 | "jhipsterVersion": "6.6.0", 22 | "languages": ["en", "fr"], 23 | "messageBroker": "no", 24 | "nativeLanguage": "en", 25 | "otherModules": [], 26 | "packageFolder": "tech/jhipster/sample", 27 | "packageName": "tech.jhipster.sample", 28 | "prodDatabaseType": "couchbase", 29 | "reactive": true, 30 | "searchEngine": "elasticsearch", 31 | "serverPort": "8080", 32 | "serviceDiscoveryType": "no", 33 | "testFrameworks": ["gatling", "cypress"], 34 | "websocket": "no" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.blueprint/synchronize/command.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 the original author or authors from the JHipster project. 3 | * 4 | * This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | * for more information. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License") 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * https://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | const command = { 20 | configs: { 21 | newFiles: { 22 | description: 'Add new files only', 23 | cli: { 24 | type: Boolean, 25 | }, 26 | scope: 'generator', 27 | }, 28 | convert: { 29 | description: 'Apply Partial Java files to Kotlin files convertion', 30 | cli: { 31 | type: Boolean, 32 | alias: 'c', 33 | }, 34 | scope: 'generator', 35 | }, 36 | }, 37 | import: [], 38 | }; 39 | 40 | export default command; 41 | -------------------------------------------------------------------------------- /generators/ktlint/internal/ktlint-transform.js: -------------------------------------------------------------------------------- 1 | import { extname } from 'node:path'; 2 | import os from 'node:os'; 3 | import { OutOfOrder } from 'p-transform'; 4 | import { isFileStateDeleted, isFileStateModified } from 'mem-fs-editor/state'; 5 | import ktlintWorker from './ktlint-worker.js'; 6 | 7 | export const filterKtlintTransformFiles = file => isFileStateModified(file) && !isFileStateDeleted(file) && extname(file.path) === '.kt'; 8 | 9 | export const createKtlintTransform = function ({ ktlintExecutable, cwd, ignoreErrors } = {}) { 10 | return new OutOfOrder( 11 | async file => { 12 | if (!filterKtlintTransformFiles(file)) { 13 | return file; 14 | } 15 | const { result, error, info } = await ktlintWorker({ ktlintExecutable, cwd, fileContents: file.contents.toString('utf8') }); 16 | if (result) { 17 | file.contents = Buffer.from(result); 18 | } 19 | if (info) { 20 | this?.log?.info?.(info.replaceAll('', file.relative)); 21 | } 22 | if (error) { 23 | if (!ignoreErrors) { 24 | throw new Error(error); 25 | } 26 | this?.log?.warn?.(error); 27 | } 28 | return file; 29 | }, 30 | { 31 | concurrency: os.availableParallelism(), 32 | }, 33 | ).duplex(); 34 | }; 35 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Place.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20170626061521", 3 | "clientRootFolder": "test-root", 4 | "dto": "no", 5 | "entityTableName": "place", 6 | "fields": [ 7 | { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required"] }, 8 | { "fieldName": "numberOfSeats", "fieldType": "Long" }, 9 | { "fieldName": "shortName", "fieldType": "String" }, 10 | { "fieldName": "colorBackground", "fieldType": "String" }, 11 | { "fieldName": "colorText", "fieldType": "String" }, 12 | { "fieldName": "description", "fieldType": "byte[]", "fieldTypeBlobContent": "text" } 13 | ], 14 | "fluentMethods": true, 15 | "pagination": "pagination", 16 | "relationships": [ 17 | { 18 | "otherEntityField": "name", 19 | "otherEntityName": "division", 20 | "otherEntityRelationshipName": "preferredPlace", 21 | "ownerSide": true, 22 | "relationshipName": "preferredDivision", 23 | "relationshipType": "many-to-many" 24 | }, 25 | { 26 | "otherEntityField": "name", 27 | "otherEntityName": "division", 28 | "otherEntityRelationshipName": "divisionsPlace", 29 | "relationshipName": "owner", 30 | "relationshipType": "many-to-one" 31 | } 32 | ], 33 | "service": "no" 34 | } 35 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/feign-client/src/main/kotlin/_package_/client/OAuth2InterceptedFeignConfiguration.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.client 20 | 21 | <%_ if (authenticationTypeOauth2) { _%> 22 | import org.springframework.context.annotation.Bean 23 | 24 | import feign.RequestInterceptor 25 | 26 | import <%= packageName %>.security.oauth2.AuthorizationHeaderUtil 27 | 28 | class OAuth2InterceptedFeignConfiguration { 29 | 30 | @Bean(name = ["oauth2RequestInterceptor"]) 31 | fun getOAuth2RequestInterceptor(authorizationHeaderUtil: AuthorizationHeaderUtil) = 32 | TokenRelayRequestInterceptor(authorizationHeaderUtil) 33 | } 34 | <%_ } _%> 35 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/_entityPackage_/_partials_entity_/delete_template.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | <%_ if (reactive) { _%> 20 | return <%= entityInstance %><%= viaService ? 'Service.delete' : 'Repository.deleteById' %>(id) 21 | <%_ if (!viaService && searchEngineElasticsearch) { %> 22 | .then(<%= entityInstance %>SearchRepository.deleteById(id)) 23 | <%_ } -%> 24 | <%_ } else { %> 25 | <%= entityInstance %><%= viaService ? 'Service.delete' : 'Repository.deleteById' %>(id) 26 | <%_ if (!viaService && searchEngineElasticsearch) { _%> 27 | <%= entityInstance %>SearchRepository.deleteById(id) 28 | <%_ } _%> 29 | <%_ } _%> 30 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/config/Constants.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | <%_ if (generateBuiltInUserEntity) { _%> 22 | // Regex for acceptable logins 23 | const val LOGIN_REGEX: String = "<%- LOGIN_REGEX %>" 24 | <%_ } _%> 25 | <%_ if (generateBuiltInUserEntity || ['sql','mongodb','couchbase'].includes(databaseType)) { _%> 26 | const val SYSTEM_ACCOUNT: String = "system" 27 | <%_ } _%> 28 | <%_ if (generateUserManagement || authenticationTypeOauth2) { _%> 29 | const val DEFAULT_LANGUAGE: String = "<%= nativeLanguage %>" 30 | <%_ } _%> 31 | <%_ if (databaseTypeCouchbase) { _%> 32 | const val ID_DELIMITER: String = "__" 33 | <%_ } _%> 34 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/test/kotlin/_package_/_entityPackage_/service/mapper/_entityClass_MapperTest.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= entityAbsolutePackage %>.service.mapper 20 | 21 | import org.junit.jupiter.api.BeforeEach 22 | import org.junit.jupiter.api.Test 23 | import org.assertj.core.api.Assertions.assertThat 24 | <%_ if (primaryKey && primaryKey.hasUUID) { _%> 25 | import java.util.UUID 26 | <%_ } _%> 27 | 28 | class <%= entityClass %>MapperTest { 29 | 30 | private lateinit var <%= entityInstance %>Mapper: <%= entityClass %>Mapper 31 | 32 | @BeforeEach 33 | fun setUp() { 34 | <%= entityInstance %>Mapper = <%= entityClass %>MapperImpl() 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/web/rest/errors/InvalidPasswordException.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest.errors 20 | 21 | import org.zalando.problem.AbstractThrowableProblem 22 | import org.zalando.problem.Exceptional 23 | import org.zalando.problem.Status 24 | 25 | @SuppressWarnings("java:S110") // Inheritance tree of classes should not be too deep 26 | class InvalidPasswordException : 27 | AbstractThrowableProblem(INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST) { 28 | 29 | override fun getCause(): Exceptional? = super.cause 30 | 31 | companion object { 32 | private const val serialVersionUID = 1L 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.github/workflows/build-cache.yml: -------------------------------------------------------------------------------- 1 | name: build-cache 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '0 0 * * 0' 6 | jobs: 7 | build-cache: 8 | runs-on: ubuntu-latest 9 | defaults: 10 | run: 11 | working-directory: ${{ github.workspace }}/app 12 | steps: 13 | - uses: actions/checkout@v6 14 | with: 15 | path: generator-jhipster-kotlin 16 | - uses: jhipster/actions/setup-runner@v1 17 | with: 18 | node-version: 20 19 | binary-dir: ${{ github.workspace }}/generator-jhipster-kotlin/cli/ 20 | - uses: jhipster/actions/cache-npm-dependencies@v1 21 | with: 22 | generator-path: generator-jhipster-kotlin 23 | if: always() 24 | - run: cli.cjs generate-sample --all 25 | continue-on-error: true 26 | - run: npm run backend:build-cache --workspaces 27 | continue-on-error: true 28 | - uses: jhipster/actions/save-cache@v1 29 | if: always() 30 | with: 31 | key: ${{ github.run_id }} 32 | npm: true 33 | maven: true 34 | gradle: true 35 | - uses: jhipster/actions/restore-cache@v1 36 | with: 37 | npm: true 38 | maven: true 39 | gradle: true 40 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/spring-data-relational/src/main/kotlin/_package_/_entityPackage_/repository/_entityClass_Repository_r2dbc.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2024 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= entityAbsolutePackage %>.repository 20 | 21 | import <%= entityAbsolutePackage %>.domain.<%= persistClass %> 22 | 23 | import org.springframework.data.r2dbc.repository.R2dbcRepository 24 | import org.springframework.stereotype.Repository 25 | <%_ if (primaryKey.typeUUID) { _%> 26 | 27 | import java.util.UUID 28 | <%_ } _%> 29 | 30 | /** 31 | * <%= springDataDescription %> repository for the [<%= persistClass %>] entity. 32 | */ 33 | @Repository 34 | interface <%= entityClass %>Repository : R2dbcRepository<<%= persistClass %>, <%= primaryKey.type %>> 35 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/feign-client/src/main/kotlin/_package_/client/UserFeignClientInterceptor_jwt.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://jhipster.github.io/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.client 20 | 21 | import <%= packageName %>.security.getCurrentUserJWT 22 | import feign.RequestInterceptor 23 | import feign.RequestTemplate 24 | import org.springframework.stereotype.Component 25 | 26 | private const val AUTHORIZATION_HEADER = "Authorization" 27 | private const val BEARER_TOKEN_TYPE = "Bearer" 28 | 29 | @Component 30 | class UserFeignClientInterceptor : RequestInterceptor { 31 | 32 | override fun apply(template: RequestTemplate) = 33 | getCurrentUserJWT().ifPresent { s -> template.header(AUTHORIZATION_HEADER,"$BEARER_TOKEN_TYPE $s") } 34 | } 35 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-gradle-fr/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleNgxGradle", 6 | "blueprints": [], 7 | "buildTool": "gradle", 8 | "cacheProvider": "ehcache", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "h2Disk", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": true, 18 | "enableTranslation": true, 19 | "entitySuffix": "", 20 | "jhiPrefix": "jhi", 21 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 22 | "languages": ["en", "fr"], 23 | "messageBroker": "no", 24 | "nativeLanguage": "fr", 25 | "otherModules": [], 26 | "packageFolder": "tech/jhipster/sample", 27 | "packageName": "tech.jhipster.sample", 28 | "prodDatabaseType": "postgresql", 29 | "searchEngine": "no", 30 | "serverPort": "8080", 31 | "serviceDiscoveryType": "no", 32 | "testFrameworks": ["gatling", "cypress"], 33 | "websocket": "no" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-mysql-es-noi18n-mapsid/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "samplePsqlEsNoi18nMapsIdWithNgx", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "hazelcast", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "mysql", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": true, 18 | "enableSwaggerCodegen": false, 19 | "enableTranslation": false, 20 | "entitySuffix": "", 21 | "jhiPrefix": "jhi", 22 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 23 | "messageBroker": "no", 24 | "otherModules": [], 25 | "packageFolder": "tech/jhipster/sample", 26 | "packageName": "tech.jhipster.sample", 27 | "prodDatabaseType": "mysql", 28 | "searchEngine": "elasticsearch", 29 | "serverPort": "8080", 30 | "serviceDiscoveryType": "no", 31 | "testFrameworks": ["gatling", "cypress"], 32 | "websocket": "no" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-micro-consul-jwt/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "microservice", 4 | "authenticationType": "jwt", 5 | "baseName": "samplesMicroserviceEureka", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "hazelcast", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "dtoSuffix": "DTO", 14 | "embeddableLaunchScript": false, 15 | "enableHibernateCache": true, 16 | "enableTranslation": true, 17 | "entitySuffix": "", 18 | "jhiPrefix": "jhi", 19 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 20 | "languages": ["en", "fr"], 21 | "messageBroker": "no", 22 | "nativeLanguage": "en", 23 | "otherModules": [], 24 | "packageFolder": "tech/jhipster/sample", 25 | "packageName": "tech.jhipster.sample", 26 | "prodDatabaseType": "postgresql", 27 | "searchEngine": "no", 28 | "serverPort": "8081", 29 | "serviceDiscoveryType": "consul", 30 | "skipClient": true, 31 | "skipUserManagement": true, 32 | "testFrameworks": ["gatling"], 33 | "websocket": "no" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ng-gradle-mysql-es-noi18n-mapsid/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "monolith", 4 | "authenticationType": "jwt", 5 | "baseName": "samplePsqlEsNoi18nMapsIdWithNgx", 6 | "blueprints": [], 7 | "buildTool": "gradle", 8 | "cacheProvider": "hazelcast", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "mysql", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": true, 18 | "enableSwaggerCodegen": false, 19 | "enableTranslation": false, 20 | "entitySuffix": "", 21 | "jhiPrefix": "jhi", 22 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 23 | "messageBroker": "no", 24 | "otherModules": [], 25 | "packageFolder": "tech/jhipster/sample", 26 | "packageName": "tech.jhipster.sample", 27 | "prodDatabaseType": "mysql", 28 | "searchEngine": "elasticsearch", 29 | "serverPort": "8080", 30 | "serviceDiscoveryType": "no", 31 | "testFrameworks": ["gatling", "cypress"], 32 | "websocket": "no" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-ngx-gateway-eureka/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "gateway", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleGateway", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "no", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "h2Disk", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": false, 18 | "enableTranslation": true, 19 | "entitySuffix": "", 20 | "jhiPrefix": "jhi", 21 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 22 | "languages": ["en", "fr"], 23 | "messageBroker": "no", 24 | "nativeLanguage": "en", 25 | "otherModules": [], 26 | "packageFolder": "tech/jhipster/sample", 27 | "packageName": "tech.jhipster.sample", 28 | "prodDatabaseType": "postgresql", 29 | "reactive": true, 30 | "searchEngine": "no", 31 | "serverPort": "8080", 32 | "serviceDiscoveryType": "eureka", 33 | "testFrameworks": ["gatling"], 34 | "websocket": "no" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_supporting-samples/.jhipster/Division.json: -------------------------------------------------------------------------------- 1 | { 2 | "changelogDate": "20170626061520", 3 | "clientRootFolder": "test-root", 4 | "dto": "no", 5 | "entityTableName": "division", 6 | "fields": [ 7 | { "fieldName": "name", "fieldType": "String", "fieldValidateRules": ["required", "unique"] }, 8 | { "fieldName": "shortName", "fieldType": "String", "fieldValidateRules": ["unique"] }, 9 | { "fieldName": "numberOfPeople", "fieldType": "Long" }, 10 | { 11 | "fieldName": "divisionType", 12 | "fieldType": "DivisionType", 13 | "fieldValidateRules": ["required"], 14 | "fieldValues": "SCHOOL,CLASS,SUBGROUP" 15 | }, 16 | { "fieldName": "colorBackground", "fieldType": "String" }, 17 | { "fieldName": "colorText", "fieldType": "String" } 18 | ], 19 | "fluentMethods": true, 20 | "pagination": "no", 21 | "relationships": [ 22 | { 23 | "otherEntityName": "place", 24 | "otherEntityRelationshipName": "owner", 25 | "relationshipName": "divisionsPlace", 26 | "relationshipType": "one-to-many" 27 | }, 28 | { 29 | "otherEntityName": "place", 30 | "otherEntityRelationshipName": "preferredDivision", 31 | "ownerSide": false, 32 | "relationshipName": "preferredPlace", 33 | "relationshipType": "many-to-many" 34 | } 35 | ], 36 | "service": "no" 37 | } 38 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-micro-consul-infinispan/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "microservice", 4 | "authenticationType": "jwt", 5 | "baseName": "samplesMicroserviceEurekaInfinispan", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "infinispan", 9 | "clientPackageManager": "npm", 10 | "creationTimestamp": 1596513172471, 11 | "databaseType": "sql", 12 | "devDatabaseType": "h2Disk", 13 | "dtoSuffix": "DTO", 14 | "embeddableLaunchScript": false, 15 | "enableHibernateCache": true, 16 | "enableTranslation": true, 17 | "entitySuffix": "", 18 | "jhiPrefix": "jhi", 19 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 20 | "languages": ["en", "fr"], 21 | "messageBroker": "no", 22 | "nativeLanguage": "en", 23 | "otherModules": [], 24 | "packageFolder": "tech/jhipster/sample", 25 | "packageName": "tech.jhipster.sample", 26 | "prodDatabaseType": "postgresql", 27 | "searchEngine": "no", 28 | "serverPort": "8081", 29 | "serviceDiscoveryType": "consul", 30 | "skipClient": true, 31 | "skipUserManagement": true, 32 | "testFrameworks": ["gatling"], 33 | "websocket": "no" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | RUN \ 3 | # configure the "khipster" user 4 | groupadd khipster && \ 5 | useradd khipster -s /bin/bash -m -g khipster -G sudo && \ 6 | echo 'khipster:khipster' |chpasswd && \ 7 | mkdir /home/khipster/app && \ 8 | export DEBIAN_FRONTEND=noninteractive && \ 9 | export TZ=Europe\Paris && \ 10 | ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ 11 | apt-get update && \ 12 | # install utilities 13 | apt-get install -y \ 14 | wget \ 15 | sudo && \ 16 | # install node.js 17 | wget https://nodejs.org/dist/v14.15.0/node-v14.15.0-linux-x64.tar.gz -O /tmp/node.tar.gz && \ 18 | tar -C /usr/local --strip-components 1 -xzf /tmp/node.tar.gz && \ 19 | # upgrade npm 20 | npm install -g npm && \ 21 | # install yeoman 22 | npm install -g yo && \ 23 | # cleanup 24 | apt-get clean && \ 25 | rm -rf \ 26 | /home/khipster/.cache/ \ 27 | /var/lib/apt/lists/* \ 28 | /tmp/* \ 29 | /var/tmp/* 30 | 31 | RUN \ 32 | # install the blueprint 33 | npm install -g generator-jhipster-kotlin && \ 34 | # fix khipster user permissions 35 | chown -R khipster:khipster \ 36 | /home/khipster \ 37 | /usr/local/lib/node_modules && \ 38 | # cleanup 39 | rm -rf \ 40 | /home/khipster/.cache/ \ 41 | /var/lib/apt/lists/* \ 42 | /tmp/* \ 43 | /var/tmp/* 44 | 45 | # expose the working directory 46 | USER khipster 47 | ENV PATH $PATH:/usr/bin 48 | WORKDIR "/home/khipster/app" 49 | VOLUME ["/home/khipster/app"] 50 | CMD khipster -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/_entityPackage_/_partials_entity_/get_template.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | <% 20 | const instanceName = restInstance; 21 | const mapper = `${entityInstance}Mapper`; 22 | const entityToDtoReference = `${mapper}::toDto`; 23 | const returnPrefix = returnDirectly ? 'return' : `val ${instanceName} =`; 24 | %> 25 | <%_ if (!viaService) { _%> 26 | <%- returnPrefix %> <%= entityInstance %>Repository.<% if (implementsEagerLoadApis) { %>findOneWithEagerRelationships(id)<% } else { %>findById(id)<% } %><% if (!dtoMapstruct) { %><% } else { %> 27 | .map(<%= entityToDtoReference %>)<% } %> 28 | <%_ } else { _%> 29 | <%- returnPrefix %> <%= entityInstance %>Service.findOne(id) 30 | <%_ } _%> 31 | -------------------------------------------------------------------------------- /generators/spring-boot/templates/src/main/kotlin/_package_/config/ApplicationProperties.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License") 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.config 20 | 21 | import org.springframework.boot.context.properties.ConfigurationProperties 22 | 23 | /** 24 | * Properties specific to <%= humanizedBaseName %>. 25 | * 26 | * Properties are configured in the `application.yml` file. 27 | * See [tech.jhipster.config.JHipsterProperties] for a good example. 28 | */ 29 | @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) 30 | class ApplicationProperties { 31 | // jhipster-needle-application-properties-property 32 | // jhipster-needle-application-properties-property-getter 33 | // jhipster-needle-application-properties-property-class 34 | } 35 | -------------------------------------------------------------------------------- /generators/spring-boot-v2/templates/src/main/kotlin/_package_/web/rest/ClientForwardController.kt.ejs: -------------------------------------------------------------------------------- 1 | <%# 2 | Copyright 2013-2025 the original author or authors from the JHipster project. 3 | 4 | This file is part of the JHipster project, see https://www.jhipster.tech/ 5 | for more information. 6 | 7 | Licensed under the Apache License, Version 2.0 (the " 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | https://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | -%> 19 | package <%= packageName %>.web.rest 20 | 21 | import org.springframework.stereotype.Controller 22 | import org.springframework.web.bind.annotation.GetMapping 23 | 24 | @Controller 25 | class ClientForwardController { 26 | /** 27 | * Forwards any unmapped paths (except those containing a period) to the client `index.html`. 28 | * @return forward to client `index.html`. 29 | */ 30 | <%_ if (communicationSpringWebsocket) { _%> 31 | @GetMapping(value = ["/{path:[^\\.]*}", "/{path:^(?!websocket).*}/**/{path:[^\\.]*}"]) 32 | <%_ } else { _%> 33 | @GetMapping(value = ["/**/{path:[^\\.]*}"]) 34 | <%_ } _%> 35 | fun forward() = "forward:/" 36 | } 37 | -------------------------------------------------------------------------------- /.blueprint/generate-sample/templates/_json-samples/ms-ngx-gateway-consul-jwt/.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-jhipster": { 3 | "applicationType": "gateway", 4 | "authenticationType": "jwt", 5 | "baseName": "sampleGateway", 6 | "blueprints": [], 7 | "buildTool": "maven", 8 | "cacheProvider": "no", 9 | "clientFramework": "angular", 10 | "clientPackageManager": "npm", 11 | "clientTheme": "none", 12 | "creationTimestamp": 1596513172471, 13 | "databaseType": "sql", 14 | "devDatabaseType": "h2Disk", 15 | "dtoSuffix": "DTO", 16 | "embeddableLaunchScript": false, 17 | "enableHibernateCache": false, 18 | "enableTranslation": true, 19 | "entitySuffix": "", 20 | "jhiPrefix": "jhi", 21 | "jwtSecretKey": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", 22 | "languages": ["en", "fr"], 23 | "messageBroker": "no", 24 | "nativeLanguage": "en", 25 | "otherModules": [], 26 | "packageFolder": "tech/jhipster/sample", 27 | "packageName": "tech.jhipster.sample", 28 | "prodDatabaseType": "postgresql", 29 | "reactive": true, 30 | "searchEngine": "no", 31 | "serverPort": "8080", 32 | "serviceDiscoveryType": "consul", 33 | "testFrameworks": ["gatling", "cypress"], 34 | "websocket": "no" 35 | } 36 | } 37 | --------------------------------------------------------------------------------