From ce7c23e33b3a04c524718700cc94bfeff59e7b24 Mon Sep 17 00:00:00 2001 From: JHipster Bot Date: Mon, 4 Apr 2022 08:44:50 +0000 Subject: [PATCH 1/2] Add JDL Model `Accounts` See https://start.jhipster.tech/jdl-studio/#!/view/578555a4-36b9-48bb-a87d-4cd9166fa6f1 --- accounts.jh | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 accounts.jh diff --git a/accounts.jh b/accounts.jh new file mode 100644 index 0000000..735b805 --- /dev/null +++ b/accounts.jh @@ -0,0 +1,124 @@ +application { + config { + baseName FIM, + applicationType microservice, + packageName com.scb.fimob, + authenticationType jwt, + prodDatabaseType mssql, + buildTool maven + } + entities * +} +entity FimCust{ +CustId String +ClientId String maxlength(30) required +IdType String maxlength(10) required +CtryCode String maxlength(3) required +CreatedBy String maxlength(8) required +CreatedTs Instant +UpdatedBy String maxlength(8) +UpdatedTs Instant +RecordStatus String +UploadRemark String +} + +entity FimCustWq{ +CustId String +ClientId String maxlength(30) required +IdType String maxlength(10) required +CtryCode String maxlength(3) required +CreatedBy String maxlength(8) required +CreatedTs Instant +UpdatedBy String maxlength(8) +UpdatedTs Instant +RecordStatus String +UploadRemark String +} +entity FimCustHistory{ +CustId String +HistoryTs Instant +ClientId String maxlength(30) required +IdType String maxlength(10) required +CtryCode String maxlength(3) required +CreatedBy String maxlength(8) required +CreatedTs Instant +UpdatedBy String maxlength(8) +UpdatedTs Instant +RecordStatus String +} +entity FimAccounts{ + AccountId String + CustId String maxlength(30) required + RelnId String maxlength(30) required + RelnType String maxlength(5) required + OperInst String maxlength(10) + IsAcctNbr String maxlength(30) required + BndAcctNbr String maxlength(30) required + ClosingId String maxlength(10) + SubSegment String maxlength(10) + BranchCode String maxlength(10) + AcctStatus String maxlength(10) required + CtryCode String maxlength(3) + AcctOwners String maxlength(100) + Remarks String maxlength(200) + CreatedBy String maxlength(8) + CreatedTs Instant + UpdatedBy String maxlength(8) + UpdatedTs Instant + RecordStatus String maxlength(10) +} + + +entity FimAccountsHistory{ +AccountId String +HistoryTs Instant +CustId String maxlength(30) required +RelnId String maxlength(30) required +RelnType String maxlength(5) required +OperInst String maxlength(10) +IsAcctNbr String maxlength(30) required +BndAcctNbr String maxlength(30) required +ClosingId String maxlength(10) +SubSegment String maxlength(10) +BranchCode String maxlength(10) +AcctStatus String maxlength(10) required +CtryCode String maxlength(3) +AcctOwners String maxlength(100) +Remarks String maxlength(200) +CreatedBy String maxlength(8) +CreatedTs Instant +UpdatedBy String maxlength(8) +UpdatedTs Instant +RecordStatus String maxlength(10) +} +entity FimSettAcct{ +SettaccId String +AccountId String maxlength(15) required +SettAcctNbr String maxlength(30) required +SettCcy String maxlength(3) required +SettAcctStatus String maxlength(10) required +CreatedBy String maxlength(8) +CreatedTs Instant +UpdatedBy String maxlength(8) +UpdatedTs Instant +RecordStatus String maxlength(10) +} +entity FimSettAcctHistory{ +SettaccId String +HistoryTs Instant +AccountId String maxlength(15) required +SettAcctNbr String maxlength(30) required +SettCcy String maxlength(3) required +SettAcctStatus String maxlength(10) required +CreatedBy String maxlength(08) +CreatedTs Instant +UpdatedBy String maxlength(8) +UpdatedTs Instant +RecordStatus String maxlength(10) +} + +service * with serviceClass +dto all with mapstruct + +paginate FimCust,FimSettAcct with pagination + \ No newline at end of file From 0c96d310ae52665ef279039b0f861f3e1d425d6d Mon Sep 17 00:00:00 2001 From: JHipster Bot Date: Mon, 4 Apr 2022 08:45:03 +0000 Subject: [PATCH 2/2] Generate entities from JDL Model `Accounts` See https://start.jhipster.tech/jdl-studio/#!/view/578555a4-36b9-48bb-a87d-4cd9166fa6f1 --- .gitignore | 1 - .husky/pre-commit | 2 +- .jhipster/FimAccounts.json | 127 +++++++++ .jhipster/FimAccountsHistory.json | 131 +++++++++ .jhipster/FimCust.json | 69 +++++ .jhipster/FimCustHistory.json | 69 +++++ .jhipster/FimCustWq.json | 69 +++++ .jhipster/FimSettAcct.json | 73 +++++ .jhipster/FimSettAcctHistory.json | 77 ++++++ .lintstagedrc.js | 2 +- .yo-rc.json | 20 +- package.json | 106 +------- pom.xml | 252 ++---------------- sonar-project.properties | 8 +- src/main/docker/app.yml | 12 +- src/main/docker/jib/entrypoint.sh | 2 +- src/main/docker/monitoring.yml | 4 +- src/main/docker/mssql.yml | 4 +- src/main/docker/sonar.yml | 2 +- .../client/UserFeignClientInterceptor.java | 18 ++ .../scb/fimob/config/AsyncConfiguration.java | 46 ++++ .../config/DateTimeFormatConfiguration.java | 20 ++ .../fimob/config/LiquibaseConfiguration.java | 69 +++++ .../fimob/config/LoggingConfiguration.java | 53 ++++ .../fimob/domain/AbstractAuditingEntity.java | 76 ++++++ .../com/scb/fimob/domain/package-info.java | 4 + .../fimob/security/AuthoritiesConstants.java | 15 ++ .../com/scb/fimob/security/SecurityUtils.java | 100 +++++++ .../security/SpringSecurityAuditorAware.java | 18 ++ src/main/resources/.h2.server.properties | 2 +- src/main/resources/config/application-dev.yml | 12 +- .../resources/config/application-prod.yml | 12 +- src/main/resources/config/application.yml | 21 +- src/main/resources/config/bootstrap-prod.yml | 2 +- src/main/resources/config/bootstrap.yml | 4 +- .../resources/config/liquibase/master.xml | 7 + src/main/resources/logback-spring.xml | 1 + src/main/resources/static/index.html | 6 +- src/test/resources/logback.xml | 3 +- 39 files changed, 1141 insertions(+), 378 deletions(-) create mode 100644 .jhipster/FimAccounts.json create mode 100644 .jhipster/FimAccountsHistory.json create mode 100644 .jhipster/FimCust.json create mode 100644 .jhipster/FimCustHistory.json create mode 100644 .jhipster/FimCustWq.json create mode 100644 .jhipster/FimSettAcct.json create mode 100644 .jhipster/FimSettAcctHistory.json create mode 100644 src/main/java/com/scb/fimob/client/UserFeignClientInterceptor.java create mode 100644 src/main/java/com/scb/fimob/config/AsyncConfiguration.java create mode 100644 src/main/java/com/scb/fimob/config/DateTimeFormatConfiguration.java create mode 100644 src/main/java/com/scb/fimob/config/LiquibaseConfiguration.java create mode 100644 src/main/java/com/scb/fimob/config/LoggingConfiguration.java create mode 100644 src/main/java/com/scb/fimob/domain/AbstractAuditingEntity.java create mode 100644 src/main/java/com/scb/fimob/domain/package-info.java create mode 100644 src/main/java/com/scb/fimob/security/AuthoritiesConstants.java create mode 100644 src/main/java/com/scb/fimob/security/SecurityUtils.java create mode 100644 src/main/java/com/scb/fimob/security/SpringSecurityAuditorAware.java diff --git a/.gitignore b/.gitignore index 50f7684..4dd6fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ ###################### # Project Specific ###################### -/src/main/webapp/content/css/main.css /target/classes/static/** /src/test/javascript/coverage/ diff --git a/.husky/pre-commit b/.husky/pre-commit index adefefb..3efbda8 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,4 @@ . "$(dirname "$0")/_/husky.sh" -"$(dirname "$0")/../npmw" exec --no-install lint-staged +npx --no-install lint-staged diff --git a/.jhipster/FimAccounts.json b/.jhipster/FimAccounts.json new file mode 100644 index 0000000..08e0a89 --- /dev/null +++ b/.jhipster/FimAccounts.json @@ -0,0 +1,127 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084456", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_accounts", + "fields": [ + { + "fieldName": "accountId", + "fieldType": "String" + }, + { + "fieldName": "custId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "relnId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "relnType", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "5" + }, + { + "fieldName": "operInst", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "isAcctNbr", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "bndAcctNbr", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "closingId", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "subSegment", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "branchCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "acctStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "ctryCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "acctOwners", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "100" + }, + { + "fieldName": "remarks", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "200" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimAccounts", + "pagination": "no", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.jhipster/FimAccountsHistory.json b/.jhipster/FimAccountsHistory.json new file mode 100644 index 0000000..deaa85f --- /dev/null +++ b/.jhipster/FimAccountsHistory.json @@ -0,0 +1,131 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084457", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_accounts_history", + "fields": [ + { + "fieldName": "accountId", + "fieldType": "String" + }, + { + "fieldName": "historyTs", + "fieldType": "Instant" + }, + { + "fieldName": "custId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "relnId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "relnType", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "5" + }, + { + "fieldName": "operInst", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "isAcctNbr", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "bndAcctNbr", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "closingId", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "subSegment", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "branchCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "acctStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "ctryCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "acctOwners", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "100" + }, + { + "fieldName": "remarks", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "200" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimAccountsHistory", + "pagination": "no", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.jhipster/FimCust.json b/.jhipster/FimCust.json new file mode 100644 index 0000000..c719758 --- /dev/null +++ b/.jhipster/FimCust.json @@ -0,0 +1,69 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084453", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_cust", + "fields": [ + { + "fieldName": "custId", + "fieldType": "String" + }, + { + "fieldName": "clientId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "idType", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "ctryCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String" + }, + { + "fieldName": "uploadRemark", + "fieldType": "String" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimCust", + "pagination": "pagination", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.jhipster/FimCustHistory.json b/.jhipster/FimCustHistory.json new file mode 100644 index 0000000..990d27b --- /dev/null +++ b/.jhipster/FimCustHistory.json @@ -0,0 +1,69 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084455", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_cust_history", + "fields": [ + { + "fieldName": "custId", + "fieldType": "String" + }, + { + "fieldName": "historyTs", + "fieldType": "Instant" + }, + { + "fieldName": "clientId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "idType", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "ctryCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimCustHistory", + "pagination": "no", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.jhipster/FimCustWq.json b/.jhipster/FimCustWq.json new file mode 100644 index 0000000..43fe8a5 --- /dev/null +++ b/.jhipster/FimCustWq.json @@ -0,0 +1,69 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084454", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_cust_wq", + "fields": [ + { + "fieldName": "custId", + "fieldType": "String" + }, + { + "fieldName": "clientId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "idType", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "ctryCode", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String" + }, + { + "fieldName": "uploadRemark", + "fieldType": "String" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimCustWq", + "pagination": "no", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.jhipster/FimSettAcct.json b/.jhipster/FimSettAcct.json new file mode 100644 index 0000000..cfa4905 --- /dev/null +++ b/.jhipster/FimSettAcct.json @@ -0,0 +1,73 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084458", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_sett_acct", + "fields": [ + { + "fieldName": "settaccId", + "fieldType": "String" + }, + { + "fieldName": "accountId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "15" + }, + { + "fieldName": "settAcctNbr", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "settCcy", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "settAcctStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimSettAcct", + "pagination": "pagination", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.jhipster/FimSettAcctHistory.json b/.jhipster/FimSettAcctHistory.json new file mode 100644 index 0000000..21e613d --- /dev/null +++ b/.jhipster/FimSettAcctHistory.json @@ -0,0 +1,77 @@ +{ + "applications": ["FIM"], + "changelogDate": "20220404084459", + "clientRootFolder": "FIM", + "databaseType": "sql", + "dto": "mapstruct", + "embedded": false, + "entityTableName": "fim_sett_acct_history", + "fields": [ + { + "fieldName": "settaccId", + "fieldType": "String" + }, + { + "fieldName": "historyTs", + "fieldType": "Instant" + }, + { + "fieldName": "accountId", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "15" + }, + { + "fieldName": "settAcctNbr", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "30" + }, + { + "fieldName": "settCcy", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "3" + }, + { + "fieldName": "settAcctStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength", "required"], + "fieldValidateRulesMaxlength": "10" + }, + { + "fieldName": "createdBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "08" + }, + { + "fieldName": "createdTs", + "fieldType": "Instant" + }, + { + "fieldName": "updatedBy", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "8" + }, + { + "fieldName": "updatedTs", + "fieldType": "Instant" + }, + { + "fieldName": "recordStatus", + "fieldType": "String", + "fieldValidateRules": ["maxlength"], + "fieldValidateRulesMaxlength": "10" + } + ], + "fluentMethods": true, + "jpaMetamodelFiltering": false, + "microserviceName": "FIM", + "name": "FimSettAcctHistory", + "pagination": "no", + "readOnly": false, + "relationships": [], + "service": "serviceClass" +} diff --git a/.lintstagedrc.js b/.lintstagedrc.js index 6876878..dad2893 100644 --- a/.lintstagedrc.js +++ b/.lintstagedrc.js @@ -1,3 +1,3 @@ module.exports = { - '{,src/**/,webpack/}*.{md,json,yml,html,cjs,mjs,js,ts,tsx,css,scss,java}': ['prettier --write'], + '{,src/**/}*.{md,json,yml,html,java}': ['prettier --write'], }; diff --git a/.yo-rc.json b/.yo-rc.json index f103428..fd59ecd 100644 --- a/.yo-rc.json +++ b/.yo-rc.json @@ -1,11 +1,12 @@ { "generator-jhipster": { + "applicationIndex": 0, "applicationType": "microservice", "authenticationType": "jwt", - "baseName": "Springboot", + "baseName": "FIM", "blueprints": [], "buildTool": "maven", - "cacheProvider": "no", + "cacheProvider": "ehcache", "clientFramework": "angularX", "clientPackageManager": "npm", "clientTheme": "none", @@ -16,28 +17,31 @@ "devServerPort": 4200, "dtoSuffix": "DTO", "enableGradleEnterprise": false, - "enableHibernateCache": false, + "enableHibernateCache": true, "enableSwaggerCodegen": false, - "enableTranslation": false, + "enableTranslation": true, + "entities": ["FimCust", "FimCustWq", "FimCustHistory", "FimAccounts", "FimAccountsHistory", "FimSettAcct", "FimSettAcctHistory"], "entitySuffix": "", "gitCompany": "", + "gradleEnterpriseHost": "", "jhiPrefix": "jhi", "jhipsterVersion": "7.7.0", "jwtSecretKey": "NDM3ZDQxYjZkNDU5YTY4MTAwNGJjOGJkMmIzNDAwZTQwMzliODhkYWM5ZjQ1OTdjYmI3MTI1NzM4YzFmMWVmZjQyZDY2YjJkODQ4YmI2OTI2OTAwMTM2YTczODkxNzUyMDExNWQzMDEwN2MyOTQxMDUwMGMzZjcwYTQ2MDkwMzA=", "languages": ["en"], + "lastLiquibaseTimestamp": 1649061899000, "messageBroker": false, "nativeLanguage": "en", "otherModules": [], - "packageFolder": "com/sc/myapp", - "packageName": "com.sc.myapp", + "packageFolder": "com/scb/fimob", + "packageName": "com.scb.fimob", "pages": [], "prodDatabaseType": "mssql", "reactive": false, "searchEngine": false, - "serverPort": 8081, + "serverPort": "8081", "serviceDiscoveryType": "eureka", "skipCheckLengthOfIdentifier": false, - "skipClient": false, + "skipClient": true, "skipFakeData": false, "skipUserManagement": true, "testFrameworks": [], diff --git a/package.json b/package.json index 744b36d..edfbad2 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "springboot", - "version": "0.0.1-SNAPSHOT", + "name": "fim", + "version": "0.0.0", "private": true, - "description": "Description for Springboot", + "description": "Description for FIM", "license": "UNLICENSED", "scripts": { "app:start": "./mvnw", @@ -11,22 +11,16 @@ "backend:doc:test": "./mvnw -ntp javadoc:javadoc --batch-mode", "backend:info": "./mvnw -ntp enforcer:display-info --batch-mode", "backend:nohttp:test": "./mvnw -ntp checkstyle:check --batch-mode", - "backend:start": "./mvnw -Dskip.installnodenpm -Dskip.npm", - "backend:unit:test": "./mvnw -ntp -Dskip.installnodenpm -Dskip.npm verify --batch-mode -Dlogging.level.ROOT=OFF -Dlogging.level.org.zalando=OFF -Dlogging.level.tech.jhipster=OFF -Dlogging.level.com.sc.myapp=OFF -Dlogging.level.org.springframework=OFF -Dlogging.level.org.springframework.web=OFF -Dlogging.level.org.springframework.security=OFF", - "build": "npm run webapp:prod --", - "build-watch": "concurrently 'npm run webapp:build:dev -- --watch' npm:backend:start", + "backend:start": "./mvnw", + "backend:unit:test": "./mvnw -ntp verify --batch-mode -Dlogging.level.ROOT=OFF -Dlogging.level.org.zalando=OFF -Dlogging.level.tech.jhipster=OFF -Dlogging.level.com.scb.fimob=OFF -Dlogging.level.org.springframework=OFF -Dlogging.level.org.springframework.web=OFF -Dlogging.level.org.springframework.security=OFF", "ci:backend:test": "npm run backend:info && npm run backend:doc:test && npm run backend:nohttp:test && npm run backend:unit:test -- -P$npm_package_config_default_environment", "ci:e2e:package": "npm run java:$npm_package_config_packaging:$npm_package_config_default_environment -- -Pe2e -Denforcer.skip=true", "ci:e2e:prepare": "npm run ci:e2e:prepare:docker", "ci:e2e:prepare:docker": "npm run docker:db:up && npm run docker:others:up && docker ps -a", "preci:e2e:server:start": "npm run docker:db:await --if-present && npm run docker:others:await --if-present", - "ci:e2e:server:start": "java -jar target/e2e.$npm_package_config_packaging --spring.profiles.active=e2e,$npm_package_config_default_environment -Dlogging.level.ROOT=OFF -Dlogging.level.org.zalando=OFF -Dlogging.level.tech.jhipster=OFF -Dlogging.level.com.sc.myapp=OFF -Dlogging.level.org.springframework=OFF -Dlogging.level.org.springframework.web=OFF -Dlogging.level.org.springframework.security=OFF --logging.level.org.springframework.web=ERROR", + "ci:e2e:server:start": "java -jar target/e2e.$npm_package_config_packaging --spring.profiles.active=e2e,$npm_package_config_default_environment -Dlogging.level.ROOT=OFF -Dlogging.level.org.zalando=OFF -Dlogging.level.tech.jhipster=OFF -Dlogging.level.com.scb.fimob=OFF -Dlogging.level.org.springframework=OFF -Dlogging.level.org.springframework.web=OFF -Dlogging.level.org.springframework.security=OFF --logging.level.org.springframework.web=ERROR", "ci:e2e:teardown": "npm run ci:e2e:teardown:docker", "ci:e2e:teardown:docker": "npm run docker:db:down --if-present && npm run docker:others:down && docker ps -a", - "ci:frontend:build": "npm run webapp:build:$npm_package_config_default_environment", - "ci:frontend:test": "npm run ci:frontend:build && npm test", - "clean-www": "rimraf target/classes/static/app/{src,target/}", - "cleanup": "rimraf target/classes/static/", "docker:app:up": "docker-compose -f src/main/docker/app.yml up -d", "docker:db:down": "docker-compose -f src/main/docker/mssql.yml down -v --remove-orphans", "docker:db:up": "docker-compose -f src/main/docker/mssql.yml up -d", @@ -46,105 +40,27 @@ "java:war": "./mvnw -ntp verify -DskipTests --batch-mode -Pwar", "java:war:dev": "npm run java:war -- -Pdev,webapp", "java:war:prod": "npm run java:war -- -Pprod", - "jest": "jest --coverage --logHeapUsage --maxWorkers=2 --config jest.conf.js", - "lint": "eslint . --ext .js,.ts", - "lint:fix": "npm run lint -- --fix", "prepare": "husky install", - "prettier:check": "prettier --check \"{,src/**/,webpack/}*.{md,json,yml,html,cjs,mjs,js,ts,tsx,css,scss,java}\"", - "prettier:format": "prettier --write \"{,src/**/,webpack/}*.{md,json,yml,html,cjs,mjs,js,ts,tsx,css,scss,java}\"", - "serve": "npm run start --", - "start": "ng serve", - "start-tls": "npm run webapp:dev-ssl", - "pretest": "npm run lint", - "test": "ng test --coverage --log-heap-usage -w=2", - "test:watch": "npm run test -- --watch", - "watch": "concurrently npm:start npm:backend:start", - "webapp:build": "npm run clean-www && npm run webapp:build:dev", - "webapp:build:dev": "ng build --configuration development", - "webapp:build:prod": "ng build --configuration production", - "webapp:dev": "ng serve", - "webapp:dev-ssl": "ng serve --ssl", - "webapp:dev-verbose": "ng serve --verbose", - "webapp:prod": "npm run clean-www && npm run webapp:build:prod", - "webapp:test": "npm run test --" + "prettier:check": "prettier --check \"{,src/**/}*.{md,json,yml,html,java}\"", + "prettier:format": "prettier --write \"{,src/**/}*.{md,json,yml,html,java}\"" }, "config": { - "backend_port": 8081, + "backend_port": "8081", "default_environment": "prod", "packaging": "jar" }, - "dependencies": { - "@angular/common": "13.2.4", - "@angular/compiler": "13.2.4", - "@angular/core": "13.2.4", - "@angular/forms": "13.2.4", - "@angular/localize": "13.2.4", - "@angular/platform-browser": "13.2.4", - "@angular/platform-browser-dynamic": "13.2.4", - "@angular/router": "13.2.4", - "@fortawesome/angular-fontawesome": "0.10.1", - "@fortawesome/fontawesome-svg-core": "1.3.0", - "@fortawesome/free-solid-svg-icons": "6.0.0", - "@ng-bootstrap/ng-bootstrap": "12.0.0", - "@popperjs/core": "2.11.2", - "bootstrap": "5.1.3", - "dayjs": "1.10.7", - "ngx-infinite-scroll": "10.0.1", - "ngx-webstorage": "9.0.0", - "rxjs": "7.5.4", - "swagger-ui-dist": "4.5.2", - "tslib": "2.3.1", - "zone.js": "0.11.4" - }, "devDependencies": { - "@angular-builders/custom-webpack": "13.1.0", - "@angular-builders/jest": "13.0.3", - "@angular-devkit/build-angular": "13.2.5", - "@angular-eslint/eslint-plugin": "13.1.0", - "@angular/cli": "13.2.5", - "@angular/compiler-cli": "13.2.4", - "@angular/service-worker": "13.2.4", - "@types/jest": "27.4.1", - "@types/node": "16.11.26", - "@typescript-eslint/eslint-plugin": "5.12.1", - "@typescript-eslint/parser": "5.12.1", - "browser-sync": "2.27.7", - "browser-sync-webpack-plugin": "2.3.0", - "concurrently": "7.0.0", - "copy-webpack-plugin": "10.2.4", - "eslint": "8.9.0", - "eslint-config-prettier": "8.4.0", - "eslint-webpack-plugin": "3.1.1", "generator-jhipster": "7.7.0", "husky": "7.0.4", - "jest": "27.5.1", - "jest-date-mock": "1.0.8", - "jest-junit": "13.0.0", - "jest-preset-angular": "11.1.1", - "jest-sonar-reporter": "2.0.0", "lint-staged": "12.3.4", "prettier": "2.5.1", "prettier-plugin-java": "1.6.1", - "prettier-plugin-packagejson": "2.2.15", - "rimraf": "3.0.2", - "ts-jest": "27.1.3", - "typescript": "4.5.5", - "wait-on": "6.0.1", - "webpack-bundle-analyzer": "4.5.0", - "webpack-merge": "5.8.0", - "webpack-notifier": "1.15.0" + "prettier-plugin-packagejson": "2.2.15" }, "engines": { "node": ">=16.14.0" }, "cacheDirectories": [ "node_modules" - ], - "jestSonar": { - "reportPath": "target/test-results/jest", - "reportFile": "TESTS-results-sonar.xml" - }, - "overrides": { - "webpack": "5.69.1" - } + ] } diff --git a/pom.xml b/pom.xml index f5f5696..ee0c6f9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.sc.myapp - springboot + com.scb.fimob + fim 0.0.1-SNAPSHOT jar - Springboot - Description for Springboot + FIM + Description for FIM @@ -26,15 +26,12 @@ 3.3.9 11 - v16.14.0 - 8.4.1 - UTF-8 UTF-8 yyyyMMddHHmmss ${java.version} ${java.version} - com.sc.myapp.SpringbootApp + com.scb.fimob.FimApp -Djava.security.egd=file:/dev/./urandom -Xmx256m jdt_apt false @@ -77,9 +74,6 @@ 3.1.2 9.3 0.0.10 - 1.12.1 - 1.11 - 3.0.0 5.0.0 2.3.0 0.8.7 @@ -114,6 +108,10 @@ javax.annotation javax.annotation-api + + org.springframework.boot + spring-boot-starter-cache + com.fasterxml.jackson.module jackson-module-jaxb-annotations @@ -146,6 +144,18 @@ org.apache.commons commons-lang3 + + javax.cache + cache-api + + + org.ehcache + ehcache + + + org.hibernate + hibernate-jcache + org.hibernate hibernate-jpamodelgen @@ -477,23 +487,6 @@ WEB-INF/**,META-INF/** false - target/classes/static/ - - - src/main/webapp - - WEB-INF/** - - - - - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - target @@ -604,7 +597,7 @@ - springboot:latest + fim:latest @@ -829,140 +822,6 @@ ,tls - - webapp - - true - - - - com.h2database - h2 - - - - - - net.nicoulaj.maven.plugins - checksum-maven-plugin - ${checksum-maven-plugin.version} - - - create-pre-compiled-webapp-checksum - - files - - generate-resources - - - create-compiled-webapp-checksum - - files - - compile - - checksums.csv.old - - - - - - - ${project.basedir} - - src/main/webapp/**/*.* - target/classes/static/**/*.* - package-lock.json - package.json - webpack/*.* - tsconfig.json - tsconfig.app.json - - - **/app/**/service-worker.js - **/app/**/vendor.css - - - - false - false - false - - SHA-1 - - true - true - - - - org.apache.maven.plugins - maven-antrun-plugin - ${maven-antrun-plugin.version} - - - eval-frontend-checksum - generate-resources - - run - - - - - - - - - - - - true - - - - - - com.github.eirslett - frontend-maven-plugin - - - install-node-and-npm - - install-node-and-npm - - - ${node.version} - ${npm.version} - - - - npm install - - npm - - - - webapp build dev - - npm - - generate-resources - - run webapp:build - - ${project.version} - - false - - - - - - - - - dev${profile.no-liquibase} - - dev @@ -996,11 +855,11 @@ ${project.basedir}/src/main/resources/config/liquibase/master.xml ${project.basedir}/src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml org.h2.Driver - jdbc:h2:file:${project.build.directory}/h2db/db/springboot + jdbc:h2:file:${project.build.directory}/h2db/db/fim - Springboot + FIM - hibernate:spring:com.sc.myapp.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy + hibernate:spring:com.scb.fimob.domain?dialect=org.hibernate.dialect.H2Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy true debug !test @@ -1082,53 +941,6 @@ - - com.github.eirslett - frontend-maven-plugin - - - install-node-and-npm - - install-node-and-npm - - - ${node.version} - ${npm.version} - - - - npm install - - npm - - - - webapp build test - - npm - - test - - run webapp:test - false - - - - webapp build prod - - npm - - generate-resources - - run webapp:prod - - ${project.version} - - false - - - - io.github.git-commit-id git-commit-id-maven-plugin @@ -1233,20 +1045,6 @@ - - - com.github.eirslett - frontend-maven-plugin - ${frontend-maven-plugin.version} - - install-node-and-npm - npm - - - - - - diff --git a/sonar-project.properties b/sonar-project.properties index 24f8ee0..dedcdd7 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,16 +1,14 @@ -sonar.projectKey=Springboot -sonar.projectName=Springboot generated by jhipster +sonar.projectKey=FIM +sonar.projectName=FIM generated by jhipster sonar.projectVersion=1.0 sonar.sources=src/main/ sonar.host.url=http://localhost:9001 -sonar.test.inclusions=src/test/**/*.*, src/main/webapp/app/**/*.spec.ts +sonar.tests=src/test/ sonar.coverage.jacoco.xmlReportPaths=target/site/**/jacoco*.xml sonar.java.codeCoveragePlugin=jacoco sonar.junit.reportPaths=target/surefire-reports,target/failsafe-reports -sonar.testExecutionReportPaths=target/test-results/jest/TESTS-results-sonar.xml -sonar.javascript.lcov.reportPaths=target/test-results/lcov.info sonar.sourceEncoding=UTF-8 sonar.exclusions=src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/classes/static/**/*.* diff --git a/src/main/docker/app.yml b/src/main/docker/app.yml index 5d1665a..3a80341 100644 --- a/src/main/docker/app.yml +++ b/src/main/docker/app.yml @@ -1,18 +1,18 @@ # This configuration is intended for development purpose, it's **your** responsibility to harden it for production version: '3.8' services: - springboot-app: - image: springboot + fim-app: + image: fim environment: - _JAVA_OPTIONS=-Xmx512m -Xms256m - SPRING_PROFILES_ACTIVE=prod,api-docs - MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config - - SPRING_DATASOURCE_URL=jdbc:sqlserver://springboot-mssql:1433;database=Springboot - - SPRING_LIQUIBASE_URL=jdbc:sqlserver://springboot-mssql:1433;database=Springboot + - SPRING_DATASOURCE_URL=jdbc:sqlserver://fim-mssql:1433;database=FIM + - SPRING_LIQUIBASE_URL=jdbc:sqlserver://fim-mssql:1433;database=FIM - JHIPSTER_SLEEP=60 # gives time for mssql server to start - springboot-mssql: + fim-mssql: image: mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04 # volumes are not supported on macOS # volumes: @@ -21,7 +21,7 @@ services: - ACCEPT_EULA=Y - MSSQL_PID=Express - SA_PASSWORD=yourStrong(!)Password - - MSSQL_DATABASE=Springboot + - MSSQL_DATABASE=FIM - MSSQL_SLEEP=60 # If you want to expose these ports outside your dev PC, # remove the "127.0.0.1:" prefix diff --git a/src/main/docker/jib/entrypoint.sh b/src/main/docker/jib/entrypoint.sh index 11d5ca0..06ee80d 100644 --- a/src/main/docker/jib/entrypoint.sh +++ b/src/main/docker/jib/entrypoint.sh @@ -1,4 +1,4 @@ #!/bin/sh echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} -exec java ${JAVA_OPTS} -noverify -XX:+AlwaysPreTouch -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "com.sc.myapp.SpringbootApp" "$@" +exec java ${JAVA_OPTS} -noverify -XX:+AlwaysPreTouch -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "com.scb.fimob.FimApp" "$@" diff --git a/src/main/docker/monitoring.yml b/src/main/docker/monitoring.yml index 8ddf310..f91e524 100644 --- a/src/main/docker/monitoring.yml +++ b/src/main/docker/monitoring.yml @@ -1,7 +1,7 @@ # This configuration is intended for development purpose, it's **your** responsibility to harden it for production version: '3.8' services: - springboot-prometheus: + fim-prometheus: image: prom/prometheus:v2.33.3 volumes: - ./prometheus/:/etc/prometheus/ @@ -14,7 +14,7 @@ services: # On MacOS, remove next line and replace localhost by host.docker.internal in prometheus/prometheus.yml and # grafana/provisioning/datasources/datasource.yml network_mode: 'host' # to test locally running service - springboot-grafana: + fim-grafana: image: grafana/grafana:8.4.1 volumes: - ./grafana/provisioning/:/etc/grafana/provisioning/ diff --git a/src/main/docker/mssql.yml b/src/main/docker/mssql.yml index ea5d472..938ec5c 100644 --- a/src/main/docker/mssql.yml +++ b/src/main/docker/mssql.yml @@ -1,7 +1,7 @@ # This configuration is intended for development purpose, it's **your** responsibility to harden it for production version: '3.8' services: - springboot-mssql: + fim-mssql: image: mcr.microsoft.com/mssql/server:2019-CU15-ubuntu-20.04 # volumes are not supported on macOS # volumes: @@ -10,7 +10,7 @@ services: - ACCEPT_EULA=Y - MSSQL_PID=Express - SA_PASSWORD=yourStrong(!)Password - - MSSQL_DATABASE=Springboot + - MSSQL_DATABASE=FIM - MSSQL_SLEEP=60 # If you want to expose these ports outside your dev PC, # remove the "127.0.0.1:" prefix diff --git a/src/main/docker/sonar.yml b/src/main/docker/sonar.yml index 2c4af55..be77934 100644 --- a/src/main/docker/sonar.yml +++ b/src/main/docker/sonar.yml @@ -1,7 +1,7 @@ # This configuration is intended for development purpose, it's **your** responsibility to harden it for production version: '3.8' services: - springboot-sonar: + fim-sonar: image: sonarqube:9.3.0-community # Authentication is turned off for out of the box experience while trying out SonarQube # For real use cases delete sonar.forceAuthentication variable or set sonar.forceAuthentication=true diff --git a/src/main/java/com/scb/fimob/client/UserFeignClientInterceptor.java b/src/main/java/com/scb/fimob/client/UserFeignClientInterceptor.java new file mode 100644 index 0000000..c525cf1 --- /dev/null +++ b/src/main/java/com/scb/fimob/client/UserFeignClientInterceptor.java @@ -0,0 +1,18 @@ +package com.scb.fimob.client; + +import com.scb.fimob.security.SecurityUtils; +import feign.RequestInterceptor; +import feign.RequestTemplate; +import org.springframework.stereotype.Component; + +@Component +public class UserFeignClientInterceptor implements RequestInterceptor { + + private static final String AUTHORIZATION_HEADER = "Authorization"; + private static final String BEARER = "Bearer"; + + @Override + public void apply(RequestTemplate template) { + SecurityUtils.getCurrentUserJWT().ifPresent(s -> template.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER, s))); + } +} diff --git a/src/main/java/com/scb/fimob/config/AsyncConfiguration.java b/src/main/java/com/scb/fimob/config/AsyncConfiguration.java new file mode 100644 index 0000000..4271f44 --- /dev/null +++ b/src/main/java/com/scb/fimob/config/AsyncConfiguration.java @@ -0,0 +1,46 @@ +package com.scb.fimob.config; + +import java.util.concurrent.Executor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; +import org.springframework.boot.autoconfigure.task.TaskExecutionProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.AsyncConfigurer; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import tech.jhipster.async.ExceptionHandlingAsyncTaskExecutor; + +@Configuration +@EnableAsync +@EnableScheduling +public class AsyncConfiguration implements AsyncConfigurer { + + private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); + + private final TaskExecutionProperties taskExecutionProperties; + + public AsyncConfiguration(TaskExecutionProperties taskExecutionProperties) { + this.taskExecutionProperties = taskExecutionProperties; + } + + @Override + @Bean(name = "taskExecutor") + public Executor getAsyncExecutor() { + log.debug("Creating Async Task Executor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(taskExecutionProperties.getPool().getCoreSize()); + executor.setMaxPoolSize(taskExecutionProperties.getPool().getMaxSize()); + executor.setQueueCapacity(taskExecutionProperties.getPool().getQueueCapacity()); + executor.setThreadNamePrefix(taskExecutionProperties.getThreadNamePrefix()); + return new ExceptionHandlingAsyncTaskExecutor(executor); + } + + @Override + public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { + return new SimpleAsyncUncaughtExceptionHandler(); + } +} diff --git a/src/main/java/com/scb/fimob/config/DateTimeFormatConfiguration.java b/src/main/java/com/scb/fimob/config/DateTimeFormatConfiguration.java new file mode 100644 index 0000000..69d9bad --- /dev/null +++ b/src/main/java/com/scb/fimob/config/DateTimeFormatConfiguration.java @@ -0,0 +1,20 @@ +package com.scb.fimob.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * Configure the converters to use the ISO format for dates by default. + */ +@Configuration +public class DateTimeFormatConfiguration implements WebMvcConfigurer { + + @Override + public void addFormatters(FormatterRegistry registry) { + DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); + registrar.setUseIsoFormat(true); + registrar.registerFormatters(registry); + } +} diff --git a/src/main/java/com/scb/fimob/config/LiquibaseConfiguration.java b/src/main/java/com/scb/fimob/config/LiquibaseConfiguration.java new file mode 100644 index 0000000..946b2b0 --- /dev/null +++ b/src/main/java/com/scb/fimob/config/LiquibaseConfiguration.java @@ -0,0 +1,69 @@ +package com.scb.fimob.config; + +import java.util.concurrent.Executor; +import javax.sql.DataSource; +import liquibase.integration.spring.SpringLiquibase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseDataSource; +import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.core.env.Profiles; +import tech.jhipster.config.JHipsterConstants; +import tech.jhipster.config.liquibase.SpringLiquibaseUtil; + +@Configuration +public class LiquibaseConfiguration { + + private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); + + private final Environment env; + + public LiquibaseConfiguration(Environment env) { + this.env = env; + } + + @Bean + public SpringLiquibase liquibase( + @Qualifier("taskExecutor") Executor executor, + @LiquibaseDataSource ObjectProvider liquibaseDataSource, + LiquibaseProperties liquibaseProperties, + ObjectProvider dataSource, + DataSourceProperties dataSourceProperties + ) { + // If you don't want Liquibase to start asynchronously, substitute by this: + // SpringLiquibase liquibase = SpringLiquibaseUtil.createSpringLiquibase(liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties); + SpringLiquibase liquibase = SpringLiquibaseUtil.createAsyncSpringLiquibase( + this.env, + executor, + liquibaseDataSource.getIfAvailable(), + liquibaseProperties, + dataSource.getIfUnique(), + dataSourceProperties + ); + liquibase.setChangeLog("classpath:config/liquibase/master.xml"); + liquibase.setContexts(liquibaseProperties.getContexts()); + liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); + liquibase.setLiquibaseSchema(liquibaseProperties.getLiquibaseSchema()); + liquibase.setLiquibaseTablespace(liquibaseProperties.getLiquibaseTablespace()); + liquibase.setDatabaseChangeLogLockTable(liquibaseProperties.getDatabaseChangeLogLockTable()); + liquibase.setDatabaseChangeLogTable(liquibaseProperties.getDatabaseChangeLogTable()); + liquibase.setDropFirst(liquibaseProperties.isDropFirst()); + liquibase.setLabels(liquibaseProperties.getLabels()); + liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); + liquibase.setRollbackFile(liquibaseProperties.getRollbackFile()); + liquibase.setTestRollbackOnUpdate(liquibaseProperties.isTestRollbackOnUpdate()); + if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE))) { + liquibase.setShouldRun(false); + } else { + liquibase.setShouldRun(liquibaseProperties.isEnabled()); + log.debug("Configuring Liquibase"); + } + return liquibase; + } +} diff --git a/src/main/java/com/scb/fimob/config/LoggingConfiguration.java b/src/main/java/com/scb/fimob/config/LoggingConfiguration.java new file mode 100644 index 0000000..66c49ed --- /dev/null +++ b/src/main/java/com/scb/fimob/config/LoggingConfiguration.java @@ -0,0 +1,53 @@ +package com.scb.fimob.config; + +import static tech.jhipster.config.logging.LoggingUtils.*; + +import ch.qos.logback.classic.LoggerContext; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.HashMap; +import java.util.Map; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.info.BuildProperties; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Configuration; +import tech.jhipster.config.JHipsterProperties; + +/* + * Configures the console and Logstash log appenders from the app properties + */ +@Configuration +@RefreshScope +public class LoggingConfiguration { + + public LoggingConfiguration( + @Value("${spring.application.name}") String appName, + @Value("${server.port}") String serverPort, + JHipsterProperties jHipsterProperties, + ObjectProvider buildProperties, + ObjectMapper mapper + ) throws JsonProcessingException { + LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); + + Map map = new HashMap<>(); + map.put("app_name", appName); + map.put("app_port", serverPort); + buildProperties.ifAvailable(it -> map.put("version", it.getVersion())); + String customFields = mapper.writeValueAsString(map); + + JHipsterProperties.Logging loggingProperties = jHipsterProperties.getLogging(); + JHipsterProperties.Logging.Logstash logstashProperties = loggingProperties.getLogstash(); + + if (loggingProperties.isUseJsonFormat()) { + addJsonConsoleAppender(context, customFields); + } + if (logstashProperties.isEnabled()) { + addLogstashTcpSocketAppender(context, customFields, logstashProperties); + } + if (loggingProperties.isUseJsonFormat() || logstashProperties.isEnabled()) { + addContextListener(context, customFields, loggingProperties); + } + } +} diff --git a/src/main/java/com/scb/fimob/domain/AbstractAuditingEntity.java b/src/main/java/com/scb/fimob/domain/AbstractAuditingEntity.java new file mode 100644 index 0000000..4093b17 --- /dev/null +++ b/src/main/java/com/scb/fimob/domain/AbstractAuditingEntity.java @@ -0,0 +1,76 @@ +package com.scb.fimob.domain; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.Serializable; +import java.time.Instant; +import javax.persistence.Column; +import javax.persistence.EntityListeners; +import javax.persistence.MappedSuperclass; +import org.springframework.data.annotation.CreatedBy; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedBy; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +/** + * Base abstract class for entities which will hold definitions for created, last modified, created by, + * last modified by attributes. + */ +@MappedSuperclass +@EntityListeners(AuditingEntityListener.class) +public abstract class AbstractAuditingEntity implements Serializable { + + private static final long serialVersionUID = 1L; + + @CreatedBy + @Column(name = "created_by", nullable = false, length = 50, updatable = false) + @JsonIgnore + private String createdBy; + + @CreatedDate + @Column(name = "created_date", updatable = false) + @JsonIgnore + private Instant createdDate = Instant.now(); + + @LastModifiedBy + @Column(name = "last_modified_by", length = 50) + @JsonIgnore + private String lastModifiedBy; + + @LastModifiedDate + @Column(name = "last_modified_date") + @JsonIgnore + private Instant lastModifiedDate = Instant.now(); + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Instant getCreatedDate() { + return createdDate; + } + + public void setCreatedDate(Instant createdDate) { + this.createdDate = createdDate; + } + + public String getLastModifiedBy() { + return lastModifiedBy; + } + + public void setLastModifiedBy(String lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public Instant getLastModifiedDate() { + return lastModifiedDate; + } + + public void setLastModifiedDate(Instant lastModifiedDate) { + this.lastModifiedDate = lastModifiedDate; + } +} diff --git a/src/main/java/com/scb/fimob/domain/package-info.java b/src/main/java/com/scb/fimob/domain/package-info.java new file mode 100644 index 0000000..a1d7ea0 --- /dev/null +++ b/src/main/java/com/scb/fimob/domain/package-info.java @@ -0,0 +1,4 @@ +/** + * JPA domain objects. + */ +package com.scb.fimob.domain; diff --git a/src/main/java/com/scb/fimob/security/AuthoritiesConstants.java b/src/main/java/com/scb/fimob/security/AuthoritiesConstants.java new file mode 100644 index 0000000..d5669e8 --- /dev/null +++ b/src/main/java/com/scb/fimob/security/AuthoritiesConstants.java @@ -0,0 +1,15 @@ +package com.scb.fimob.security; + +/** + * Constants for Spring Security authorities. + */ +public final class AuthoritiesConstants { + + public static final String ADMIN = "ROLE_ADMIN"; + + public static final String USER = "ROLE_USER"; + + public static final String ANONYMOUS = "ROLE_ANONYMOUS"; + + private AuthoritiesConstants() {} +} diff --git a/src/main/java/com/scb/fimob/security/SecurityUtils.java b/src/main/java/com/scb/fimob/security/SecurityUtils.java new file mode 100644 index 0000000..76535a0 --- /dev/null +++ b/src/main/java/com/scb/fimob/security/SecurityUtils.java @@ -0,0 +1,100 @@ +package com.scb.fimob.security; + +import java.util.Arrays; +import java.util.Optional; +import java.util.stream.Stream; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; + +/** + * Utility class for Spring Security. + */ +public final class SecurityUtils { + + private SecurityUtils() {} + + /** + * Get the login of the current user. + * + * @return the login of the current user. + */ + public static Optional getCurrentUserLogin() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional.ofNullable(extractPrincipal(securityContext.getAuthentication())); + } + + private static String extractPrincipal(Authentication authentication) { + if (authentication == null) { + return null; + } else if (authentication.getPrincipal() instanceof UserDetails) { + UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); + return springSecurityUser.getUsername(); + } else if (authentication.getPrincipal() instanceof String) { + return (String) authentication.getPrincipal(); + } + return null; + } + + /** + * Get the JWT of the current user. + * + * @return the JWT of the current user. + */ + public static Optional getCurrentUserJWT() { + SecurityContext securityContext = SecurityContextHolder.getContext(); + return Optional + .ofNullable(securityContext.getAuthentication()) + .filter(authentication -> authentication.getCredentials() instanceof String) + .map(authentication -> (String) authentication.getCredentials()); + } + + /** + * Check if a user is authenticated. + * + * @return true if the user is authenticated, false otherwise. + */ + public static boolean isAuthenticated() { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + return authentication != null && getAuthorities(authentication).noneMatch(AuthoritiesConstants.ANONYMOUS::equals); + } + + /** + * Checks if the current user has any of the authorities. + * + * @param authorities the authorities to check. + * @return true if the current user has any of the authorities, false otherwise. + */ + public static boolean hasCurrentUserAnyOfAuthorities(String... authorities) { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + return ( + authentication != null && getAuthorities(authentication).anyMatch(authority -> Arrays.asList(authorities).contains(authority)) + ); + } + + /** + * Checks if the current user has none of the authorities. + * + * @param authorities the authorities to check. + * @return true if the current user has none of the authorities, false otherwise. + */ + public static boolean hasCurrentUserNoneOfAuthorities(String... authorities) { + return !hasCurrentUserAnyOfAuthorities(authorities); + } + + /** + * Checks if the current user has a specific authority. + * + * @param authority the authority to check. + * @return true if the current user has the authority, false otherwise. + */ + public static boolean hasCurrentUserThisAuthority(String authority) { + return hasCurrentUserAnyOfAuthorities(authority); + } + + private static Stream getAuthorities(Authentication authentication) { + return authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority); + } +} diff --git a/src/main/java/com/scb/fimob/security/SpringSecurityAuditorAware.java b/src/main/java/com/scb/fimob/security/SpringSecurityAuditorAware.java new file mode 100644 index 0000000..6bc50ec --- /dev/null +++ b/src/main/java/com/scb/fimob/security/SpringSecurityAuditorAware.java @@ -0,0 +1,18 @@ +package com.scb.fimob.security; + +import com.scb.fimob.config.Constants; +import java.util.Optional; +import org.springframework.data.domain.AuditorAware; +import org.springframework.stereotype.Component; + +/** + * Implementation of {@link AuditorAware} based on Spring Security. + */ +@Component +public class SpringSecurityAuditorAware implements AuditorAware { + + @Override + public Optional getCurrentAuditor() { + return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM)); + } +} diff --git a/src/main/resources/.h2.server.properties b/src/main/resources/.h2.server.properties index 59abfef..2162059 100644 --- a/src/main/resources/.h2.server.properties +++ b/src/main/resources/.h2.server.properties @@ -1,5 +1,5 @@ #H2 Server Properties -0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/springboot|Springboot +0=JHipster H2 (Disk)|org.h2.Driver|jdbc\:h2\:file\:./target/h2db/db/fim|FIM webAllowOthers=true webPort=8092 webSSL=false diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 0edbfee..12dad3a 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -18,7 +18,7 @@ logging: ROOT: DEBUG tech.jhipster: DEBUG org.hibernate.SQL: DEBUG - com.sc.myapp: DEBUG + com.scb.fimob: DEBUG eureka: instance: @@ -41,14 +41,14 @@ spring: config: uri: http://admin:${jhipster.registry.password}@localhost:8761/config # name of the config server's property source (file.yml) that we want to use - name: Springboot + name: FIM profile: dev label: main # toggle to switch to a different version of the configuration as stored in git # it can be set to any label, branch or commit of the configuration source Git repository datasource: type: com.zaxxer.hikari.HikariDataSource - url: jdbc:h2:file:./target/h2db/db/springboot;DB_CLOSE_DELAY=-1 - username: Springboot + url: jdbc:h2:file:./target/h2db/db/fim;DB_CLOSE_DELAY=-1 + username: FIM password: hikari: poolName: Hikari @@ -91,6 +91,10 @@ server: # =================================================================== jhipster: + cache: # Cache configuration + ehcache: # Ehcache configuration + time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache + max-entries: 100 # Number of objects in each cache entry registry: password: admin # CORS is disabled by default on microservices, as you should access them through a gateway. diff --git a/src/main/resources/config/application-prod.yml b/src/main/resources/config/application-prod.yml index 1898bbb..45c7ee6 100644 --- a/src/main/resources/config/application-prod.yml +++ b/src/main/resources/config/application-prod.yml @@ -17,7 +17,7 @@ logging: level: ROOT: INFO tech.jhipster: INFO - com.sc.myapp: INFO + com.scb.fimob: INFO eureka: instance: @@ -46,13 +46,13 @@ spring: max-attempts: 100 uri: http://admin:${jhipster.registry.password}@localhost:8761/config # name of the config server's property source (file.yml) that we want to use - name: Springboot + name: FIM profile: prod label: main # toggle to switch to a different version of the configuration as stored in git # it can be set to any label, branch or commit of the configuration source Git repository datasource: type: com.zaxxer.hikari.HikariDataSource - url: jdbc:sqlserver://localhost:1433;database=Springboot + url: jdbc:sqlserver://localhost:1433;database=FIM username: SA password: yourStrong(!)Password hikari: @@ -86,7 +86,7 @@ spring: # =================================================================== # To enable TLS in production, generate a certificate using: -# keytool -genkey -alias springboot -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 +# keytool -genkey -alias fim -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 # # You can also use Let's Encrypt: # https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm @@ -121,6 +121,10 @@ jhipster: http: cache: # Used by the CachingHttpHeadersFilter timeToLiveInDays: 1461 + cache: # Cache configuration + ehcache: # Ehcache configuration + time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache + max-entries: 1000 # Number of objects in each cache entry registry: password: admin security: diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml index 86abddc..c1419e7 100644 --- a/src/main/resources/config/application.yml +++ b/src/main/resources/config/application.yml @@ -34,8 +34,8 @@ eureka: instance-info-replication-interval-seconds: 10 registry-fetch-interval-seconds: 10 instance: - appname: springboot - instanceId: springboot:${spring.application.instance-id:${random.value}} + appname: fim + instanceId: fim:${spring.application.instance-id:${random.value}} lease-renewal-interval-in-seconds: 5 lease-expiration-duration-in-seconds: 10 status-page-url-path: ${management.endpoints.web.base-path}/info @@ -73,6 +73,7 @@ management: 'loggers', 'prometheus', 'threaddump', + 'caches', 'liquibase', ] endpoint: @@ -123,7 +124,7 @@ management: spring: application: - name: Springboot + name: FIM profiles: # The commented value for `active` can be replaced with valid Spring profiles to load. # Otherwise, it will be filled in by maven when building the JAR file @@ -147,7 +148,7 @@ spring: hibernate.jdbc.time_zone: UTC hibernate.id.new_generator_mappings: true hibernate.connection.provider_disables_autocommit: true - hibernate.cache.use_second_level_cache: false + hibernate.cache.use_second_level_cache: true hibernate.cache.use_query_cache: false hibernate.generate_statistics: false # modify batch size as necessary @@ -174,13 +175,13 @@ spring: matching-strategy: ant_path_matcher task: execution: - thread-name-prefix: springboot-task- + thread-name-prefix: fim-task- pool: core-size: 2 max-size: 50 queue-capacity: 10000 scheduling: - thread-name-prefix: springboot-scheduling- + thread-name-prefix: fim-scheduling- pool: size: 2 thymeleaf: @@ -211,7 +212,7 @@ info: jhipster: clientApp: - name: 'springbootApp' + name: 'fimApp' # By default CORS is disabled. Uncomment to enable. # cors: # allowed-origins: "http://localhost:8100,http://localhost:9000" @@ -221,12 +222,12 @@ jhipster: # allow-credentials: true # max-age: 1800 mail: - from: Springboot@localhost + from: FIM@localhost api-docs: default-include-pattern: ${server.servlet.context-path:}/api/** management-include-pattern: ${server.servlet.context-path:}/management/** - title: Springboot API - description: Springboot API documentation + title: FIM API + description: FIM API documentation version: 0.0.1 terms-of-service-url: contact-name: diff --git a/src/main/resources/config/bootstrap-prod.yml b/src/main/resources/config/bootstrap-prod.yml index 3a630a9..04cf144 100644 --- a/src/main/resources/config/bootstrap-prod.yml +++ b/src/main/resources/config/bootstrap-prod.yml @@ -12,7 +12,7 @@ spring: max-attempts: 100 uri: http://admin:${jhipster.registry.password}@localhost:8761/config # name of the config server's property source (file.yml) that we want to use - name: Springboot + name: FIM profile: prod # profile(s) of the property source label: main # toggle to switch to a different version of the configuration as stored in git # it can be set to any label, branch or commit of the configuration source Git repository diff --git a/src/main/resources/config/bootstrap.yml b/src/main/resources/config/bootstrap.yml index ef66608..1ca00b2 100644 --- a/src/main/resources/config/bootstrap.yml +++ b/src/main/resources/config/bootstrap.yml @@ -9,7 +9,7 @@ jhipster: spring: application: - name: Springboot + name: FIM profiles: # The commented value for `active` can be replaced with valid Spring profiles to load. # Otherwise, it will be filled in by maven when building the JAR file @@ -20,7 +20,7 @@ spring: fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config uri: http://admin:${jhipster.registry.password}@localhost:8761/config # name of the config server's property source (file.yml) that we want to use - name: Springboot + name: FIM profile: dev # profile(s) of the property source label: main # toggle to switch to a different version of the configuration as stored in git # it can be set to any label, branch or commit of the configuration source Git repository diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 1da9fa8..30ae915 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -15,6 +15,13 @@ + + + + + + + diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 8ddd065..c813edc 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -40,6 +40,7 @@ + diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index ea92548..de6d400 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -80,11 +80,7 @@

Welcome, Java Hipster!

    -
  • - JHipster's microfrontends implementation doesn't provide a stand-alone UI. Packaged microfrontends should be accessed through a - JHipster gateway. -
  • -
  • Stand-alone development server can be started by `npm start`.
  • +
  • It does not have a front-end. The front-end should be generated on a JHipster gateway.
  • It is serving REST APIs, under the '/api' URLs.
  • diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml index 2f75d2d..7b12e20 100644 --- a/src/test/resources/logback.xml +++ b/src/test/resources/logback.xml @@ -4,7 +4,7 @@ - + @@ -25,6 +25,7 @@ +