Skip to content

Commit d141cf1

Browse files
authored
spring-boot: integrate spring-data generators (#32050)
1 parent 7b390c1 commit d141cf1

File tree

191 files changed

+300
-291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+300
-291
lines changed

.blueprint/github-build-matrix/support/__snapshots__/git-chages.spec.ts.snap

Lines changed: 127 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ exports[`git-changes generators/spring-boot/generators/cucumber/index.ts should
888888
}
889889
`;
890890

891-
exports[`git-changes generators/spring-boot/generators/jwt/index.ts should match changes snapshot 1`] = `
891+
exports[`git-changes generators/spring-boot/generators/data-cassandra/index.ts should match changes snapshot 1`] = `
892892
{
893893
"angular": false,
894894
"angularWorkflow": false,
@@ -905,14 +905,14 @@ exports[`git-changes generators/spring-boot/generators/jwt/index.ts should match
905905
"react": false,
906906
"reactWorkflow": false,
907907
"sonarPr": false,
908-
"springBootDefaults": true,
908+
"springBootDefaults": false,
909909
"vue": false,
910910
"vueWorkflow": false,
911911
"workspaces": false,
912912
}
913913
`;
914914

915-
exports[`git-changes generators/spring-boot/generators/oauth2/index.ts should match changes snapshot 1`] = `
915+
exports[`git-changes generators/spring-boot/generators/data-couchbase/index.ts should match changes snapshot 1`] = `
916916
{
917917
"angular": false,
918918
"angularWorkflow": false,
@@ -936,7 +936,7 @@ exports[`git-changes generators/spring-boot/generators/oauth2/index.ts should ma
936936
}
937937
`;
938938

939-
exports[`git-changes generators/spring-boot/generators/websocket/index.ts should match changes snapshot 1`] = `
939+
exports[`git-changes generators/spring-boot/generators/data-elasticsearch/index.ts should match changes snapshot 1`] = `
940940
{
941941
"angular": false,
942942
"angularWorkflow": false,
@@ -960,7 +960,55 @@ exports[`git-changes generators/spring-boot/generators/websocket/index.ts should
960960
}
961961
`;
962962

963-
exports[`git-changes generators/spring-boot/index.ts should match changes snapshot 1`] = `
963+
exports[`git-changes generators/spring-boot/generators/data-mongodb/index.ts should match changes snapshot 1`] = `
964+
{
965+
"angular": false,
966+
"angularWorkflow": false,
967+
"base": false,
968+
"ci": false,
969+
"client": false,
970+
"common": false,
971+
"devBlueprint": false,
972+
"devserverWorkflow": false,
973+
"e2e": false,
974+
"generateBlueprint": false,
975+
"graalvm": false,
976+
"java": true,
977+
"react": false,
978+
"reactWorkflow": false,
979+
"sonarPr": false,
980+
"springBootDefaults": false,
981+
"vue": false,
982+
"vueWorkflow": false,
983+
"workspaces": false,
984+
}
985+
`;
986+
987+
exports[`git-changes generators/spring-boot/generators/data-neo4j/index.ts should match changes snapshot 1`] = `
988+
{
989+
"angular": false,
990+
"angularWorkflow": false,
991+
"base": false,
992+
"ci": false,
993+
"client": false,
994+
"common": false,
995+
"devBlueprint": false,
996+
"devserverWorkflow": false,
997+
"e2e": false,
998+
"generateBlueprint": false,
999+
"graalvm": false,
1000+
"java": true,
1001+
"react": false,
1002+
"reactWorkflow": false,
1003+
"sonarPr": false,
1004+
"springBootDefaults": false,
1005+
"vue": false,
1006+
"vueWorkflow": false,
1007+
"workspaces": false,
1008+
}
1009+
`;
1010+
1011+
exports[`git-changes generators/spring-boot/generators/data-relational/index.ts should match changes snapshot 1`] = `
9641012
{
9651013
"angular": false,
9661014
"angularWorkflow": false,
@@ -984,7 +1032,31 @@ exports[`git-changes generators/spring-boot/index.ts should match changes snapsh
9841032
}
9851033
`;
9861034

987-
exports[`git-changes generators/spring-cloud/index.ts should match changes snapshot 1`] = `
1035+
exports[`git-changes generators/spring-boot/generators/jwt/index.ts should match changes snapshot 1`] = `
1036+
{
1037+
"angular": false,
1038+
"angularWorkflow": false,
1039+
"base": false,
1040+
"ci": false,
1041+
"client": false,
1042+
"common": false,
1043+
"devBlueprint": false,
1044+
"devserverWorkflow": false,
1045+
"e2e": false,
1046+
"generateBlueprint": false,
1047+
"graalvm": false,
1048+
"java": true,
1049+
"react": false,
1050+
"reactWorkflow": false,
1051+
"sonarPr": false,
1052+
"springBootDefaults": true,
1053+
"vue": false,
1054+
"vueWorkflow": false,
1055+
"workspaces": false,
1056+
}
1057+
`;
1058+
1059+
exports[`git-changes generators/spring-boot/generators/oauth2/index.ts should match changes snapshot 1`] = `
9881060
{
9891061
"angular": false,
9901062
"angularWorkflow": false,
@@ -1008,7 +1080,55 @@ exports[`git-changes generators/spring-cloud/index.ts should match changes snaps
10081080
}
10091081
`;
10101082

1011-
exports[`git-changes generators/spring-data/index.ts should match changes snapshot 1`] = `
1083+
exports[`git-changes generators/spring-boot/generators/websocket/index.ts should match changes snapshot 1`] = `
1084+
{
1085+
"angular": false,
1086+
"angularWorkflow": false,
1087+
"base": false,
1088+
"ci": false,
1089+
"client": false,
1090+
"common": false,
1091+
"devBlueprint": false,
1092+
"devserverWorkflow": false,
1093+
"e2e": false,
1094+
"generateBlueprint": false,
1095+
"graalvm": false,
1096+
"java": true,
1097+
"react": false,
1098+
"reactWorkflow": false,
1099+
"sonarPr": false,
1100+
"springBootDefaults": false,
1101+
"vue": false,
1102+
"vueWorkflow": false,
1103+
"workspaces": false,
1104+
}
1105+
`;
1106+
1107+
exports[`git-changes generators/spring-boot/index.ts should match changes snapshot 1`] = `
1108+
{
1109+
"angular": false,
1110+
"angularWorkflow": false,
1111+
"base": false,
1112+
"ci": false,
1113+
"client": false,
1114+
"common": false,
1115+
"devBlueprint": false,
1116+
"devserverWorkflow": false,
1117+
"e2e": false,
1118+
"generateBlueprint": false,
1119+
"graalvm": false,
1120+
"java": true,
1121+
"react": false,
1122+
"reactWorkflow": false,
1123+
"sonarPr": false,
1124+
"springBootDefaults": true,
1125+
"vue": false,
1126+
"vueWorkflow": false,
1127+
"workspaces": false,
1128+
}
1129+
`;
1130+
1131+
exports[`git-changes generators/spring-cloud/index.ts should match changes snapshot 1`] = `
10121132
{
10131133
"angular": false,
10141134
"angularWorkflow": false,

.blueprint/github-build-matrix/support/git-changes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const patterns = {
2929
springBootDefaults: [
3030
'generators/spring-boot/*',
3131
'generators/spring-boot/{resources,templates,generators/bootstrap,generators/jwt}/**',
32-
'generators/spring-data/generators/relational/**',
32+
'generators/spring-boot/generators/data-relational/**',
3333
'generators/{java,java-simple-application,liquibase,server}/**',
3434
],
3535
sonarPr: ['.github/actions/sonar/**'],

generators/base-application/generators/bootstrap/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import { mutateData, removeFieldsWithNullishValues } from '../../../../lib/utils
3333
import { loadDerivedConfig } from '../../../base-core/internal/config-def.ts';
3434
import { isWin32 } from '../../../base-core/support/index.ts';
3535
import serverCommand from '../../../server/command.ts';
36+
import type { Application as SpringDataRelationalApplication } from '../../../spring-boot/generators/data-relational/types.ts';
3637
import type { Application as SpringBootApplication } from '../../../spring-boot/types.ts';
37-
import type { Application as SpringDataRelationalApplication } from '../../../spring-data/generators/relational/types.ts';
3838
import { mutateApplication } from '../../application.ts';
3939
import { mutateRelationship, mutateRelationshipWithEntity } from '../../entity.ts';
4040
import BaseApplicationGenerator from '../../index.ts';

generators/base-application/support/prepare-entity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import type { Application as ClientApplication } from '../../client/types.ts';
3131
import type { DatabaseProperty } from '../../liquibase/types.ts';
3232
import { getDatabaseTypeData, hibernateSnakeCase } from '../../server/support/index.ts';
3333
import type { Entity as ServerEntity } from '../../server/types.ts';
34+
import type { Application as SpringDataRelationalApplication } from '../../spring-boot/generators/data-relational/types.ts';
3435
import type { Application as SpringBootApplication } from '../../spring-boot/types.ts';
35-
import type { Application as SpringDataRelationalApplication } from '../../spring-data/generators/relational/types.ts';
3636
import { mutateEntity } from '../entity.ts';
3737
import type {
3838
Application as BaseApplicationApplication,

generators/base-core/internal/jhipster7-context.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313
getSpecificationBuildForType,
1414
hibernateSnakeCase,
1515
} from '../../server/support/index.ts';
16-
import { getDBCExtraOption } from '../../spring-data/generators/relational/support/database-data.ts';
17-
import { getJdbcUrl, getR2dbcUrl } from '../../spring-data/generators/relational/support/database-url.ts';
16+
import { getDBCExtraOption } from '../../spring-boot/generators/data-relational/support/database-data.ts';
17+
import { getJdbcUrl, getR2dbcUrl } from '../../spring-boot/generators/data-relational/support/database-url.ts';
1818
import type CoreGenerator from '../generator.ts';
1919

2020
const { BYTES, BYTE_BUFFER } = fieldTypes.RelationalOnlyDBTypes;
@@ -33,24 +33,24 @@ type MigrationProperty = Record<
3333

3434
export const jhipster7deprecatedProperties: MigrationProperty = {
3535
devDatabaseType: {
36-
behaviorOnlyReason: 'v8: devDatabaseType is only used in jhipster:spring-data:relational generator',
36+
behaviorOnlyReason: 'v8: devDatabaseType is only used in jhipster:spring-boot:data-relational generator',
3737
get: ({ data }) => {
3838
if (data.devDatabaseType !== undefined) return data.devDatabaseType;
3939
const fallbackValue = data.prodDatabaseType ?? data.databaseType;
4040

4141
console.log(
42-
`JHipster v8 behavior change(devDatabaseType is only used in jhipster:spring-data:relational generator): devDatabaseType is not set, using fallback: ${fallbackValue}`,
42+
`JHipster v8 behavior change(devDatabaseType is only used in jhipster:spring-boot:data-relational generator): devDatabaseType is not set, using fallback: ${fallbackValue}`,
4343
);
4444
return fallbackValue;
4545
},
4646
},
4747
prodDatabaseType: {
48-
behaviorOnlyReason: 'v8: prodDatabaseType is only used in jhipster:spring-data:relational generator',
48+
behaviorOnlyReason: 'v8: prodDatabaseType is only used in jhipster:spring-boot:data-relational generator',
4949
get: ({ data }) => {
5050
if (data.prodDatabaseType !== undefined) return data.prodDatabaseType;
5151

5252
console.log(
53-
`JHipster v8 behavior change(prodDatabaseType is only used in jhipster:spring-data:relational generator): devDatabaseType is not set, using fallback: ${data.databaseType}`,
53+
`JHipster v8 behavior change(prodDatabaseType is only used in jhipster:spring-boot:data-relational generator): devDatabaseType is not set, using fallback: ${data.databaseType}`,
5454
);
5555
return data.databaseType;
5656
},

generators/docker/generator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
runResult,
3030
} from '../../lib/testing/index.ts';
3131
import { shouldSupportFeatures } from '../../test/support/tests.ts';
32-
import { matchElasticSearchDocker } from '../spring-data/generators/elasticsearch/__test-support/elastic-search-matcher.ts';
32+
import { matchElasticSearchDocker } from '../spring-boot/generators/data-elasticsearch/__test-support/elastic-search-matcher.ts';
3333

3434
import { matchConsul, matchEureka } from './__test-support/service-discovery-matcher.ts';
3535
import Generator from './index.ts';

generators/docker/generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import { intersection } from 'lodash-es';
2222
import { stringHashCode } from '../../lib/utils/index.ts';
2323
import { createFaker } from '../base-application/support/index.ts';
2424
import BaseApplicationGenerator from '../base-simple-application/index.ts';
25+
import type { Application as SpringDataRelationalApplication } from '../spring-boot/generators/data-relational/index.ts';
26+
import { getJdbcUrl, getR2dbcUrl } from '../spring-boot/generators/data-relational/support/index.ts';
2527
import type { Application as SpringBootApplication } from '../spring-boot/index.ts';
26-
import type { Application as SpringDataRelationalApplication } from '../spring-data/generators/relational/index.ts';
27-
import { getJdbcUrl, getR2dbcUrl } from '../spring-data/generators/relational/support/index.ts';
2828

2929
import { SERVICE_COMPLETED_SUCCESSFULLY, SERVICE_HEALTHY } from './constants.ts';
3030
import { dockerFiles } from './files.ts';

0 commit comments

Comments
 (0)