From fc2fd3b54e4e46ecd96f7995c888adbb8b0335cb Mon Sep 17 00:00:00 2001 From: Pavel Vetokhin Date: Mon, 11 Sep 2023 22:15:55 +0300 Subject: [PATCH] Refine coverage checking (#118) --- .dx/binaries.yml | 34 ++--- .dx/images.yml | 16 +-- .dx/inventory/aliases.yml | 1 - .github/workflows/solution-convincing.yml | 40 +----- .github/workflows/solution-sanity.yml | 9 -- .tools/pom.xml | 118 +++++------------- README.adoc | 6 +- apps/foo/Dockerfile | 2 +- .../bezmen/construction/{ => spec}/App.java | 42 +++---- .../data/{ => impl}/SepulkaDaoMyBatis.java | 9 +- .../data/{ => impl}/SepulkaDaoSpringData.java | 9 +- .../bezmen/data/{ => spec}/SepulkaDao.java | 4 +- .../bezmen/data/{ => spec}/SepulkaRec.java | 2 +- .../data/{ => spec}/SepulkaRecMapper.java | 4 +- .../{ => spec}/mybatis/SepulkaSqlMapper.java | 4 +- .../springdata/SepulkaRepository.java | 4 +- .../bezmen/messaging/SepulkaClientImpl.java | 19 --- .../messaging/impl/SepulkaClientImpl.java | 22 ++++ .../springmvc/SepulkaController.java | 14 +-- .../{ => spec}/SepulkaMsgMapper.java | 2 +- .../{ => spec}/SepulkaRegReqMsg.java | 2 +- .../{ => spec}/SepulkaRegResMsg.java | 2 +- .../bezmen/service/SepulkaConverterImpl.java | 11 -- .../service/impl/SepulkaConverterImpl.java | 11 ++ .../{ => impl}/SepulkaServiceImpl.java | 10 +- .../{ => spec}/SepulkaClientBeans.java | 22 ++-- .../{ => spec}/SepulkaDaoBeans.java | 28 ++--- .../bezmen/data/{ => impl}/SepulkaDaoIT.java | 7 +- .../SepulkaDaoMyBatisPostgresIT.java | 6 +- .../{ => impl}/SepulkaDaoMyBatisTest.java | 2 +- .../SepulkaDaoSpringDataPostgresIT.java | 6 +- .../messaging/{ => impl}/SepulkaClientIT.java | 9 +- .../{ => impl}/SepulkaClientSpringWeb.java | 7 +- .../{ => impl}/SepulkaClientSpringWebIT.java | 2 +- apps/pom.xml | 2 +- .../{ => impl}/BezmenClientJavaHttp.java | 5 +- .../messaging/{ => spec}/BezmenClient.java | 2 +- .../messaging/{ => spec}/FooClient.java | 2 +- .../messaging/{ => spec}/SepulkaClient.java | 2 +- .../messaging/{ => spec}/SepulkaRegReq.java | 2 +- .../messaging/{ => spec}/SepulkaRegRes.java | 2 +- .../bezmen/configuration/ConfigMode.java | 5 - .../ConfigKeeperLightbendConfig.java | 3 +- .../{ => spec}/ConfigKeeper.java | 2 +- .../bezmen/configuration/spec/ConfigMode.java | 5 + .../construction/{ => spec}/ConfigBeans.java | 8 +- .../{ => spec}/ValidationBeans.java | 6 +- .../bezmen/modeling/SepulkaConverter.java | 7 -- .../{modeling => service/spec}/Sepulka.java | 2 +- .../bezmen/service/spec/SepulkaConverter.java | 7 ++ .../spec}/SepulkaService.java | 4 +- .../BezmenValidatorHibernateValidator.java | 3 +- .../{ => impl}/ValueOfEnumValidator.java | 3 +- .../{ => spec}/BezmenValidator.java | 2 +- .../validation/{ => spec}/ValueOfEnum.java | 3 +- .../bezmen/configuration/OrmPropsCfg.java | 12 -- .../{ => impl}/DataConfigImpl.java | 11 +- .../{ => spec}/DataCfgMapper.java | 7 +- .../spec}/DataConfig.java | 2 +- .../spec}/DataProps.java | 2 +- .../{ => spec}/DataPropsCfg.java | 2 +- .../spec}/H2Props.java | 2 +- .../configuration/{ => spec}/H2PropsCfg.java | 2 +- .../spec}/OrmMode.java | 2 +- .../spec}/OrmProps.java | 2 +- .../configuration/spec/OrmPropsCfg.java | 11 ++ .../spec}/PostgresProps.java | 2 +- .../{ => spec}/PostgresPropsCfg.java | 2 +- .../bezmen/configuration/spec/VendorMode.java | 6 + .../spec}/VendorProps.java | 2 +- .../{ => spec}/VendorPropsCfg.java | 5 +- .../{ => spec}/ConditionalOnOrmMode.java | 4 +- .../construction/{ => spec}/DataBeans.java | 10 +- .../{ => spec}/DataConfigBeans.java | 16 +-- .../{ => spec}/OrmModeCondition.java | 6 +- .../{ => spec}/OrmMyBatisBeans.java | 6 +- .../{ => spec}/OrmSpringDataBeans.java | 10 +- .../bezmen/modeling/VendorMode.java | 6 - .../bezmen/configuration/DataConfigIT.java | 10 +- .../bezmen/configuration/DataConfigTest.java | 8 +- .../bezmen/fixture/DataPropsFixture.java | 4 +- .../bezmen/fixture/OrmPropsFixture.java | 6 +- .../bezmen/fixture/VendorPropsFixture.java | 8 +- .../configuration/MessagingProtocol.java | 5 - .../bezmen/configuration/WebMode.java | 5 - .../bezmen/configuration/WebPropsCfg.java | 11 -- .../{ => impl}/MessagingConfigImpl.java | 9 +- .../configuration/{ => spec}/HttpProps.java | 2 +- .../{ => spec}/HttpPropsCfg.java | 2 +- .../{ => spec}/MessagingCfgMapper.java | 2 +- .../{ => spec}/MessagingConfig.java | 2 +- .../{ => spec}/MessagingProps.java | 2 +- .../{ => spec}/MessagingPropsCfg.java | 2 +- .../configuration/spec/MessagingProtocol.java | 5 + .../{ => spec}/ProtocolProps.java | 2 +- .../{ => spec}/ProtocolPropsCfg.java | 4 +- .../bezmen/configuration/spec/WebMode.java | 5 + .../configuration/{ => spec}/WebProps.java | 2 +- .../configuration/spec/WebPropsCfg.java | 11 ++ .../{ => spec}/ConditionalOnWebMode.java | 4 +- .../{ => spec}/MessagingBeans.java | 2 +- .../{ => spec}/MessagingConfigBeans.java | 16 +-- .../{ => spec}/WebModeCondition.java | 10 +- .../{ => spec}/WebSpringMvcBeans.java | 4 +- .../configuration/MessagingConfigIT.java | 8 +- .../bezmen/fixture/HttpPropsFixture.java | 2 +- .../bezmen/fixture/MessagingPropsFixture.java | 2 +- .../bezmen/fixture/MvcPropsFixture.java | 4 +- .../bezmen/fixture/ProtocolPropsFixture.java | 4 +- libs/pom.xml | 2 +- .../bezmen/fixture/SepulkaFixtures.java | 6 +- .../org/smecalculus/bezmen/StandBeans.java | 4 +- .../bezmen/registration/SepulkaTest.java | 6 +- tests/pom.xml | 2 +- 114 files changed, 406 insertions(+), 470 deletions(-) rename apps/foo/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/App.java (75%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => impl}/SepulkaDaoMyBatis.java (70%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => impl}/SepulkaDaoSpringData.java (73%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => spec}/SepulkaDao.java (65%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => spec}/SepulkaRec.java (88%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => spec}/SepulkaRecMapper.java (63%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => spec}/mybatis/SepulkaSqlMapper.java (84%) rename apps/foo/src/main/java/org/smecalculus/bezmen/data/{ => spec}/springdata/SepulkaRepository.java (57%) delete mode 100644 apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClientImpl.java create mode 100644 apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientImpl.java rename apps/foo/src/main/java/org/smecalculus/bezmen/messaging/{ => impl}/springmvc/SepulkaController.java (65%) rename apps/foo/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/SepulkaMsgMapper.java (87%) rename apps/foo/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/SepulkaRegReqMsg.java (64%) rename apps/foo/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/SepulkaRegResMsg.java (70%) delete mode 100644 apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaConverterImpl.java create mode 100644 apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaConverterImpl.java rename apps/foo/src/main/java/org/smecalculus/bezmen/service/{ => impl}/SepulkaServiceImpl.java (66%) rename apps/foo/src/test/java/org/smecalculus/bezmen/construction/{ => spec}/SepulkaClientBeans.java (63%) rename apps/foo/src/test/java/org/smecalculus/bezmen/construction/{ => spec}/SepulkaDaoBeans.java (74%) rename apps/foo/src/test/java/org/smecalculus/bezmen/data/{ => impl}/SepulkaDaoIT.java (84%) rename apps/foo/src/test/java/org/smecalculus/bezmen/data/{ => impl}/SepulkaDaoMyBatisPostgresIT.java (56%) rename apps/foo/src/test/java/org/smecalculus/bezmen/data/{ => impl}/SepulkaDaoMyBatisTest.java (74%) rename apps/foo/src/test/java/org/smecalculus/bezmen/data/{ => impl}/SepulkaDaoSpringDataPostgresIT.java (57%) rename apps/foo/src/test/java/org/smecalculus/bezmen/messaging/{ => impl}/SepulkaClientIT.java (81%) rename apps/foo/src/test/java/org/smecalculus/bezmen/messaging/{ => impl}/SepulkaClientSpringWeb.java (69%) rename apps/foo/src/test/java/org/smecalculus/bezmen/messaging/{ => impl}/SepulkaClientSpringWebIT.java (58%) rename libs/client/src/main/java/org/smecalculus/bezmen/messaging/{ => impl}/BezmenClientJavaHttp.java (89%) rename libs/client/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/BezmenClient.java (52%) rename libs/client/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/FooClient.java (59%) rename libs/client/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/SepulkaClient.java (64%) rename libs/client/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/SepulkaRegReq.java (62%) rename libs/client/src/main/java/org/smecalculus/bezmen/messaging/{ => spec}/SepulkaRegRes.java (71%) delete mode 100644 libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigMode.java rename libs/core/src/main/java/org/smecalculus/bezmen/configuration/{ => impl}/ConfigKeeperLightbendConfig.java (73%) rename libs/core/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/ConfigKeeper.java (60%) create mode 100644 libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigMode.java rename libs/core/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/ConfigBeans.java (68%) rename libs/core/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/ValidationBeans.java (71%) delete mode 100644 libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaConverter.java rename libs/core/src/main/java/org/smecalculus/bezmen/{modeling => service/spec}/Sepulka.java (76%) create mode 100644 libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaConverter.java rename libs/core/src/main/java/org/smecalculus/bezmen/{modeling => service/spec}/SepulkaService.java (58%) rename libs/core/src/main/java/org/smecalculus/bezmen/validation/{ => impl}/BezmenValidatorHibernateValidator.java (83%) rename libs/core/src/main/java/org/smecalculus/bezmen/validation/{ => impl}/ValueOfEnumValidator.java (90%) rename libs/core/src/main/java/org/smecalculus/bezmen/validation/{ => spec}/BezmenValidator.java (65%) rename libs/core/src/main/java/org/smecalculus/bezmen/validation/{ => spec}/ValueOfEnum.java (85%) delete mode 100644 libs/data/src/main/java/org/smecalculus/bezmen/configuration/OrmPropsCfg.java rename libs/data/src/main/java/org/smecalculus/bezmen/configuration/{ => impl}/DataConfigImpl.java (58%) rename libs/data/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/DataCfgMapper.java (70%) rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/DataConfig.java (55%) rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/DataProps.java (74%) rename libs/data/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/DataPropsCfg.java (78%) rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/H2Props.java (79%) rename libs/data/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/H2PropsCfg.java (80%) rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/OrmMode.java (51%) rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/OrmProps.java (59%) create mode 100644 libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmPropsCfg.java rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/PostgresProps.java (80%) rename libs/data/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/PostgresPropsCfg.java (83%) create mode 100644 libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorMode.java rename libs/data/src/main/java/org/smecalculus/bezmen/{modeling => configuration/spec}/VendorProps.java (81%) rename libs/data/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/VendorPropsCfg.java (60%) rename libs/data/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/ConditionalOnOrmMode.java (79%) rename libs/data/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/DataBeans.java (82%) rename libs/data/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/DataConfigBeans.java (53%) rename libs/data/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/OrmModeCondition.java (84%) rename libs/data/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/OrmMyBatisBeans.java (77%) rename libs/data/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/OrmSpringDataBeans.java (82%) delete mode 100644 libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorMode.java delete mode 100644 libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProtocol.java delete mode 100644 libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebMode.java delete mode 100644 libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebPropsCfg.java rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => impl}/MessagingConfigImpl.java (58%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/HttpProps.java (68%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/HttpPropsCfg.java (73%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/MessagingCfgMapper.java (93%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/MessagingConfig.java (60%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/MessagingProps.java (71%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/MessagingPropsCfg.java (75%) create mode 100644 libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProtocol.java rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/ProtocolProps.java (81%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/ProtocolPropsCfg.java (75%) create mode 100644 libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebMode.java rename libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/{ => spec}/WebProps.java (60%) create mode 100644 libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebPropsCfg.java rename libs/messaging/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/ConditionalOnWebMode.java (79%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/MessagingBeans.java (83%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/MessagingConfigBeans.java (54%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/WebModeCondition.java (78%) rename libs/messaging/src/main/java/org/smecalculus/bezmen/construction/{ => spec}/WebSpringMvcBeans.java (67%) diff --git a/.dx/binaries.yml b/.dx/binaries.yml index 7192a059..08492d5f 100644 --- a/.dx/binaries.yml +++ b/.dx/binaries.yml @@ -24,21 +24,21 @@ ansible.builtin.debug: msg: "{{ binary_status.cmd|join(' ') }}" when: binary_status is changed - - name: Test and create binaries + - name: Create binaries ansible.builtin.command: cmd: > mvn --no-snapshot-updates --fail-fast --batch-mode - --threads 2C - --define revision={{ lib_version }} + --threads 1C clean {% if focus == 'solution' %} deploy {% else %} install {% endif %} + --define revision={{ lib_version }} chdir: "{{ playbook_dir }}/../libs" changed_when: true when: binary_status is changed @@ -72,43 +72,43 @@ msg: "{{ image_status.results|map(attribute='cmd')|map('join', ' ') }}" when: image_status is changed tags: [always] - - name: Test units and create binaries + - name: Create binaries ansible.builtin.command: cmd: > mvn --no-snapshot-updates --fail-fast --batch-mode - --threads 2C + --threads 1C {% if not hostvars.lib.binary_status|default({}) is changed %} --projects {{ image_status.results|select('changed')|map(attribute='item.key')|join(',') }} {% endif %} - --define revision={{ app_version }} - --define lib.version={{ lib_version }} clean + {% if up_to_images|default(false) %} + verify + {% else %} package + {% endif %} + --define revision={{ app_version }} + --define lib.version={{ lib_version }} chdir: "{{ playbook_dir }}/../apps" strip_empty_ends: false changed_when: true when: image_status is changed -- name: Coverage - hosts: tool +- name: Binaries + hosts: test run_once: true tasks: - - name: Generate reports + - name: Create binaries ansible.builtin.command: cmd: > mvn --no-snapshot-updates --batch-mode clean - antrun:run@units - antrun:run@integrations - antrun:run@overall - chdir: "{{ playbook_dir }}/../.tools" + test-compile + chdir: "{{ playbook_dir }}/../tests" strip_empty_ends: false changed_when: true - when: > - hostvars.lib.binary_status|default({}) is changed or - hostvars.app.image_status|default({}) is changed + when: hostvars.lib.binary_status|default({}) is changed diff --git a/.dx/images.yml b/.dx/images.yml index 6a2166d3..9bf2762a 100644 --- a/.dx/images.yml +++ b/.dx/images.yml @@ -1,5 +1,7 @@ --- - import_playbook: binaries.yml # noqa: name[play] + vars: + up_to_images: true tags: [binaries, deps] - name: Images @@ -33,21 +35,15 @@ hosts: app run_once: true tasks: - - name: Test integrations + - name: Analyze coverage ansible.builtin.command: cmd: > mvn --no-snapshot-updates - --fail-fast --batch-mode - --threads 2C - {% if not hostvars.lib.binary_status|default({}) is changed %} - --projects {{ image_status.results|select('changed')|map(attribute='item.key')|join(',') }} - {% endif %} - --define lib.version={{ lib_version }} - failsafe:integration-test - failsafe:verify - chdir: "{{ playbook_dir }}/../apps" + clean + antrun:run@coverage + chdir: "{{ playbook_dir }}/../.tools" strip_empty_ends: false changed_when: true when: image_status is changed diff --git a/.dx/inventory/aliases.yml b/.dx/inventory/aliases.yml index d2d4fcba..7b30e649 100644 --- a/.dx/inventory/aliases.yml +++ b/.dx/inventory/aliases.yml @@ -6,7 +6,6 @@ all: schema: test: dx: - tool: vars: ansible_connection: local stack: diff --git a/.github/workflows/solution-convincing.yml b/.github/workflows/solution-convincing.yml index 19cbbcf0..ccf9bedb 100644 --- a/.github/workflows/solution-convincing.yml +++ b/.github/workflows/solution-convincing.yml @@ -20,7 +20,6 @@ jobs: permissions: checks: write packages: write - pull-requests: write steps: - uses: actions/checkout@v4.0.0 - uses: ./.github/actions/prepare @@ -41,7 +40,6 @@ jobs: env: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # units reporting - uses: EnricoMi/publish-unit-test-result-action@v2.9.0 if: ${{ !cancelled() }} with: @@ -55,22 +53,6 @@ jobs: files: | libs/*/target/surefire-reports/TEST-*.xml apps/*/target/surefire-reports/TEST-*.xml - - uses: madrapps/jacoco-report@v1.6.1 - if: ${{ github.event_name == 'pull_request' && hashFiles(env.JACOCO_UNITS) != '' }} - with: - title: Unit Coverage Report - paths: ${{ env.JACOCO_UNITS }} - token: ${{ secrets.GITHUB_TOKEN }} - update-comment: true - env: - JACOCO_UNITS: .tools/target/coverage/units/jacoco.xml - - uses: actions/upload-artifact@v3.1.3 - if: ${{ !cancelled() }} - with: - name: units-coverage-report - path: .tools/target/coverage/units - if-no-files-found: ignore - # integrations reporting - uses: EnricoMi/publish-unit-test-result-action@v2.9.0 if: ${{ !cancelled() }} with: @@ -84,22 +66,6 @@ jobs: files: | libs/*/target/failsafe-reports/TEST-*.xml apps/*/target/failsafe-reports/TEST-*.xml - - uses: madrapps/jacoco-report@v1.6.1 - if: ${{ github.event_name == 'pull_request' && hashFiles(env.JACOCO_INTEGRATIONS) != '' }} - with: - title: Integration Coverage Report - paths: ${{ env.JACOCO_INTEGRATIONS }} - token: ${{ secrets.GITHUB_TOKEN }} - update-comment: true - env: - JACOCO_INTEGRATIONS: .tools/target/coverage/integrations/jacoco.xml - - uses: actions/upload-artifact@v3.1.3 - if: ${{ !cancelled() }} - with: - name: integrations-coverage-report - path: .tools/target/coverage/integrations - if-no-files-found: ignore - # fake e2e reporting - name: Always empty E2E test report. See https://github.com/orgs/community/discussions/13690 uses: EnricoMi/publish-unit-test-result-action@v2.9.0 if: ${{ !cancelled() }} @@ -112,3 +78,9 @@ jobs: job_summary: false comment_mode: off files: tests/*/target/surefire-reports/TEST-*.xml + - uses: actions/upload-artifact@v3.1.3 + if: ${{ !cancelled() }} + with: + name: test-coverage-report + path: .tools/target/coverage + if-no-files-found: ignore diff --git a/.github/workflows/solution-sanity.yml b/.github/workflows/solution-sanity.yml index 86bc7c07..d2ce0715 100644 --- a/.github/workflows/solution-sanity.yml +++ b/.github/workflows/solution-sanity.yml @@ -48,12 +48,3 @@ jobs: files: | libs/*/target/surefire-reports/TEST-*.xml apps/*/target/surefire-reports/TEST-*.xml - - uses: madrapps/jacoco-report@v1.6.1 - if: ${{ github.event_name == 'pull_request' && hashFiles(env.JACOCO_UNITS) != '' }} - with: - title: Unit Coverage Report - paths: ${{ env.JACOCO_UNITS }} - token: ${{ secrets.GITHUB_TOKEN }} - update-comment: true - env: - JACOCO_UNITS: .tools/target/coverage/units/jacoco.xml diff --git a/.tools/pom.xml b/.tools/pom.xml index 32965e87..2118ca21 100644 --- a/.tools/pom.xml +++ b/.tools/pom.xml @@ -30,7 +30,7 @@ maven-antrun-plugin - units + coverage run @@ -38,97 +38,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - integrations - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - overall - - run - - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.adoc b/README.adoc index c07fd13e..6e5f3d17 100644 --- a/README.adoc +++ b/README.adoc @@ -41,15 +41,15 @@ ==== В пределах разумного (sanity) -Запускаем анализ зависимостей, линтинг, статический анализ, компиляцию, модульные тесты, анализируем покрытие и собираем бинарники решения. +Запускаем анализ зависимостей, линтинг, статический анализ, компиляцию, модульные тесты и собираем/публикуем бинарники. ==== Убедительная (convincing) -Все перечисленное ранее. Плюс запускаем интеграционные тесты, собираем и публикуем образы. +Все перечисленное ранее. Плюс запускаем интеграционные тесты, анализируем покрытие и собираем/публикуем образы. ==== За пределами сомнений (beyond doubt) -Все перечисленное ранее. Плюс запускаем сквозные тесты, собираем и публикуем решения. +Все перечисленное ранее. Плюс запускаем сквозные тесты, собираем/публикуем решения. === Проверка конвейера diff --git a/apps/foo/Dockerfile b/apps/foo/Dockerfile index bda0a52e..efc17cbd 100644 --- a/apps/foo/Dockerfile +++ b/apps/foo/Dockerfile @@ -7,5 +7,5 @@ COPY app-foo*.jar foo/app.jar ENTRYPOINT [ \ "java", "-cp", "foo/app.jar:foo/libs/*", \ "-Dconfig.file=foo/application.conf", \ - "org.smecalculus.bezmen.construction.App" \ + "org.smecalculus.bezmen.construction.spec.App" \ ] diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/construction/App.java b/apps/foo/src/main/java/org/smecalculus/bezmen/construction/spec/App.java similarity index 75% rename from apps/foo/src/main/java/org/smecalculus/bezmen/construction/App.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/construction/spec/App.java index 929eb6a6..e1d7a043 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/construction/App.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/construction/spec/App.java @@ -1,26 +1,26 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; -import static org.smecalculus.bezmen.configuration.WebMode.SPRING_MVC; -import static org.smecalculus.bezmen.modeling.OrmMode.MY_BATIS; -import static org.smecalculus.bezmen.modeling.OrmMode.SPRING_DATA; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.MY_BATIS; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.SPRING_DATA; +import static org.smecalculus.bezmen.configuration.spec.WebMode.SPRING_MVC; -import org.smecalculus.bezmen.data.SepulkaDao; -import org.smecalculus.bezmen.data.SepulkaDaoMyBatis; -import org.smecalculus.bezmen.data.SepulkaDaoSpringData; -import org.smecalculus.bezmen.data.SepulkaRecMapper; -import org.smecalculus.bezmen.data.SepulkaRecMapperImpl; -import org.smecalculus.bezmen.data.mybatis.SepulkaSqlMapper; -import org.smecalculus.bezmen.data.springdata.SepulkaRepository; -import org.smecalculus.bezmen.messaging.SepulkaClient; -import org.smecalculus.bezmen.messaging.SepulkaClientImpl; -import org.smecalculus.bezmen.messaging.SepulkaMsgMapper; -import org.smecalculus.bezmen.messaging.SepulkaMsgMapperImpl; -import org.smecalculus.bezmen.messaging.springmvc.SepulkaController; -import org.smecalculus.bezmen.modeling.SepulkaConverter; -import org.smecalculus.bezmen.modeling.SepulkaService; -import org.smecalculus.bezmen.service.SepulkaConverterImpl; -import org.smecalculus.bezmen.service.SepulkaServiceImpl; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.data.impl.SepulkaDaoMyBatis; +import org.smecalculus.bezmen.data.impl.SepulkaDaoSpringData; +import org.smecalculus.bezmen.data.spec.SepulkaDao; +import org.smecalculus.bezmen.data.spec.SepulkaRecMapper; +import org.smecalculus.bezmen.data.spec.SepulkaRecMapperImpl; +import org.smecalculus.bezmen.data.spec.mybatis.SepulkaSqlMapper; +import org.smecalculus.bezmen.data.spec.springdata.SepulkaRepository; +import org.smecalculus.bezmen.messaging.impl.SepulkaClientImpl; +import org.smecalculus.bezmen.messaging.impl.springmvc.SepulkaController; +import org.smecalculus.bezmen.messaging.spec.SepulkaClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaMsgMapper; +import org.smecalculus.bezmen.messaging.spec.SepulkaMsgMapperImpl; +import org.smecalculus.bezmen.service.impl.SepulkaConverterImpl; +import org.smecalculus.bezmen.service.impl.SepulkaServiceImpl; +import org.smecalculus.bezmen.service.spec.SepulkaConverter; +import org.smecalculus.bezmen.service.spec.SepulkaService; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; import org.springframework.boot.SpringApplication; import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration; diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatis.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatis.java similarity index 70% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatis.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatis.java index b058b4cc..4fb936d1 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatis.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatis.java @@ -1,12 +1,15 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.impl; import static java.util.stream.Collectors.toList; import java.util.List; import java.util.UUID; import lombok.NonNull; -import org.smecalculus.bezmen.data.mybatis.SepulkaSqlMapper; -import org.smecalculus.bezmen.modeling.Sepulka; +import org.smecalculus.bezmen.data.spec.SepulkaDao; +import org.smecalculus.bezmen.data.spec.SepulkaRec; +import org.smecalculus.bezmen.data.spec.SepulkaRecMapper; +import org.smecalculus.bezmen.data.spec.mybatis.SepulkaSqlMapper; +import org.smecalculus.bezmen.service.spec.Sepulka; public record SepulkaDaoMyBatis(@NonNull SepulkaRecMapper recMapper, @NonNull SepulkaSqlMapper sqlMapper) implements SepulkaDao { diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDaoSpringData.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/impl/SepulkaDaoSpringData.java similarity index 73% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDaoSpringData.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/impl/SepulkaDaoSpringData.java index 93b6087e..7cde4f9d 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDaoSpringData.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/impl/SepulkaDaoSpringData.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.impl; import static java.util.stream.Collectors.toList; import static java.util.stream.StreamSupport.stream; @@ -6,8 +6,11 @@ import java.util.List; import java.util.UUID; import lombok.NonNull; -import org.smecalculus.bezmen.data.springdata.SepulkaRepository; -import org.smecalculus.bezmen.modeling.Sepulka; +import org.smecalculus.bezmen.data.spec.SepulkaDao; +import org.smecalculus.bezmen.data.spec.SepulkaRec; +import org.smecalculus.bezmen.data.spec.SepulkaRecMapper; +import org.smecalculus.bezmen.data.spec.springdata.SepulkaRepository; +import org.smecalculus.bezmen.service.spec.Sepulka; public record SepulkaDaoSpringData(@NonNull SepulkaRecMapper mapper, @NonNull SepulkaRepository repository) implements SepulkaDao { diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDao.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaDao.java similarity index 65% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDao.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaDao.java index 1ea8f71d..54433583 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaDao.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaDao.java @@ -1,8 +1,8 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.spec; import java.util.List; import java.util.UUID; -import org.smecalculus.bezmen.modeling.Sepulka; +import org.smecalculus.bezmen.service.spec.Sepulka; public interface SepulkaDao { diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaRec.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaRec.java similarity index 88% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaRec.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaRec.java index d429a05b..c8f23299 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaRec.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaRec.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.spec; import lombok.Data; import org.springframework.data.annotation.Id; diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaRecMapper.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaRecMapper.java similarity index 63% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaRecMapper.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaRecMapper.java index 064860b0..71ad6355 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/SepulkaRecMapper.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/SepulkaRecMapper.java @@ -1,7 +1,7 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.spec; import org.mapstruct.Mapper; -import org.smecalculus.bezmen.modeling.Sepulka; +import org.smecalculus.bezmen.service.spec.Sepulka; @Mapper public interface SepulkaRecMapper { diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/mybatis/SepulkaSqlMapper.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/mybatis/SepulkaSqlMapper.java similarity index 84% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/mybatis/SepulkaSqlMapper.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/mybatis/SepulkaSqlMapper.java index 718542c0..57e22e1e 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/mybatis/SepulkaSqlMapper.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/mybatis/SepulkaSqlMapper.java @@ -1,11 +1,11 @@ -package org.smecalculus.bezmen.data.mybatis; +package org.smecalculus.bezmen.data.spec.mybatis; import java.util.List; import java.util.Optional; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import org.smecalculus.bezmen.data.SepulkaRec; +import org.smecalculus.bezmen.data.spec.SepulkaRec; public interface SepulkaSqlMapper { diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/data/springdata/SepulkaRepository.java b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/springdata/SepulkaRepository.java similarity index 57% rename from apps/foo/src/main/java/org/smecalculus/bezmen/data/springdata/SepulkaRepository.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/springdata/SepulkaRepository.java index ed824707..21c21566 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/data/springdata/SepulkaRepository.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/data/spec/springdata/SepulkaRepository.java @@ -1,6 +1,6 @@ -package org.smecalculus.bezmen.data.springdata; +package org.smecalculus.bezmen.data.spec.springdata; -import org.smecalculus.bezmen.data.SepulkaRec; +import org.smecalculus.bezmen.data.spec.SepulkaRec; import org.springframework.data.repository.CrudRepository; public interface SepulkaRepository extends CrudRepository {} diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClientImpl.java b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClientImpl.java deleted file mode 100644 index 367b38b5..00000000 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClientImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.smecalculus.bezmen.messaging; - -import lombok.NonNull; -import org.smecalculus.bezmen.modeling.Sepulka; -import org.smecalculus.bezmen.modeling.SepulkaConverter; -import org.smecalculus.bezmen.modeling.SepulkaService; -import org.smecalculus.bezmen.validation.BezmenValidator; - -public record SepulkaClientImpl( - @NonNull BezmenValidator validator, @NonNull SepulkaService service, @NonNull SepulkaConverter converter) - implements SepulkaClient { - - @Override - public SepulkaRegRes register(SepulkaRegReq request) { - validator.validate(request); - Sepulka sepulka = service.register(request); - return converter.toRegRes(sepulka); - } -} diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientImpl.java b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientImpl.java new file mode 100644 index 00000000..6c3f53cf --- /dev/null +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientImpl.java @@ -0,0 +1,22 @@ +package org.smecalculus.bezmen.messaging.impl; + +import lombok.NonNull; +import org.smecalculus.bezmen.messaging.spec.SepulkaClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; +import org.smecalculus.bezmen.service.spec.Sepulka; +import org.smecalculus.bezmen.service.spec.SepulkaConverter; +import org.smecalculus.bezmen.service.spec.SepulkaService; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; + +public record SepulkaClientImpl( + @NonNull BezmenValidator validator, @NonNull SepulkaService service, @NonNull SepulkaConverter converter) + implements SepulkaClient { + + @Override + public SepulkaRegRes register(SepulkaRegReq request) { + validator.validate(request); + Sepulka sepulka = service.register(request); + return converter.toRegRes(sepulka); + } +} diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/springmvc/SepulkaController.java b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/springmvc/SepulkaController.java similarity index 65% rename from apps/foo/src/main/java/org/smecalculus/bezmen/messaging/springmvc/SepulkaController.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/springmvc/SepulkaController.java index 4a5796b1..659af3eb 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/springmvc/SepulkaController.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/impl/springmvc/SepulkaController.java @@ -1,11 +1,11 @@ -package org.smecalculus.bezmen.messaging.springmvc; +package org.smecalculus.bezmen.messaging.impl.springmvc; -import org.smecalculus.bezmen.messaging.SepulkaClient; -import org.smecalculus.bezmen.messaging.SepulkaMsgMapper; -import org.smecalculus.bezmen.messaging.SepulkaRegReq; -import org.smecalculus.bezmen.messaging.SepulkaRegReqMsg; -import org.smecalculus.bezmen.messaging.SepulkaRegRes; -import org.smecalculus.bezmen.messaging.SepulkaRegResMsg; +import org.smecalculus.bezmen.messaging.spec.SepulkaClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaMsgMapper; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReqMsg; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegResMsg; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaMsgMapper.java b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaMsgMapper.java similarity index 87% rename from apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaMsgMapper.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaMsgMapper.java index 05344e97..17cf1197 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaMsgMapper.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaMsgMapper.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; import org.mapstruct.Mapper; diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegReqMsg.java b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegReqMsg.java similarity index 64% rename from apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegReqMsg.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegReqMsg.java index 50f20132..d33db48d 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegReqMsg.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegReqMsg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; import lombok.Data; diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegResMsg.java b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegResMsg.java similarity index 70% rename from apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegResMsg.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegResMsg.java index 91b13002..41bbac26 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegResMsg.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegResMsg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; import lombok.Data; diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaConverterImpl.java b/apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaConverterImpl.java deleted file mode 100644 index d3c74397..00000000 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaConverterImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.smecalculus.bezmen.service; - -import org.smecalculus.bezmen.messaging.SepulkaRegRes; -import org.smecalculus.bezmen.modeling.Sepulka; -import org.smecalculus.bezmen.modeling.SepulkaConverter; - -public class SepulkaConverterImpl implements SepulkaConverter { - public SepulkaRegRes toRegRes(Sepulka sepulka) { - return new SepulkaRegRes(sepulka.id(), sepulka.name()); - } -} diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaConverterImpl.java b/apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaConverterImpl.java new file mode 100644 index 00000000..76431ef7 --- /dev/null +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaConverterImpl.java @@ -0,0 +1,11 @@ +package org.smecalculus.bezmen.service.impl; + +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; +import org.smecalculus.bezmen.service.spec.Sepulka; +import org.smecalculus.bezmen.service.spec.SepulkaConverter; + +public class SepulkaConverterImpl implements SepulkaConverter { + public SepulkaRegRes toRegRes(Sepulka sepulka) { + return new SepulkaRegRes(sepulka.id(), sepulka.name()); + } +} diff --git a/apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaServiceImpl.java b/apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaServiceImpl.java similarity index 66% rename from apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaServiceImpl.java rename to apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaServiceImpl.java index 19bb93c8..c56fbd1c 100644 --- a/apps/foo/src/main/java/org/smecalculus/bezmen/service/SepulkaServiceImpl.java +++ b/apps/foo/src/main/java/org/smecalculus/bezmen/service/impl/SepulkaServiceImpl.java @@ -1,13 +1,13 @@ -package org.smecalculus.bezmen.service; +package org.smecalculus.bezmen.service.impl; import static java.util.UUID.randomUUID; import java.util.List; import lombok.NonNull; -import org.smecalculus.bezmen.data.SepulkaDao; -import org.smecalculus.bezmen.messaging.SepulkaRegReq; -import org.smecalculus.bezmen.modeling.Sepulka; -import org.smecalculus.bezmen.modeling.SepulkaService; +import org.smecalculus.bezmen.data.spec.SepulkaDao; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.service.spec.Sepulka; +import org.smecalculus.bezmen.service.spec.SepulkaService; public record SepulkaServiceImpl(@NonNull SepulkaDao sepulkaDao) implements SepulkaService { diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/construction/SepulkaClientBeans.java b/apps/foo/src/test/java/org/smecalculus/bezmen/construction/spec/SepulkaClientBeans.java similarity index 63% rename from apps/foo/src/test/java/org/smecalculus/bezmen/construction/SepulkaClientBeans.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/construction/spec/SepulkaClientBeans.java index 2d1ab821..414b34a3 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/construction/SepulkaClientBeans.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/construction/spec/SepulkaClientBeans.java @@ -1,17 +1,17 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import static org.mockito.Mockito.mock; -import org.smecalculus.bezmen.messaging.SepulkaClient; -import org.smecalculus.bezmen.messaging.SepulkaClientImpl; -import org.smecalculus.bezmen.messaging.SepulkaClientSpringWeb; -import org.smecalculus.bezmen.messaging.SepulkaMsgMapper; -import org.smecalculus.bezmen.messaging.SepulkaMsgMapperImpl; -import org.smecalculus.bezmen.messaging.springmvc.SepulkaController; -import org.smecalculus.bezmen.modeling.SepulkaConverter; -import org.smecalculus.bezmen.modeling.SepulkaService; -import org.smecalculus.bezmen.service.SepulkaConverterImpl; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.messaging.impl.SepulkaClientImpl; +import org.smecalculus.bezmen.messaging.impl.SepulkaClientSpringWeb; +import org.smecalculus.bezmen.messaging.impl.springmvc.SepulkaController; +import org.smecalculus.bezmen.messaging.spec.SepulkaClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaMsgMapper; +import org.smecalculus.bezmen.messaging.spec.SepulkaMsgMapperImpl; +import org.smecalculus.bezmen.service.impl.SepulkaConverterImpl; +import org.smecalculus.bezmen.service.spec.SepulkaConverter; +import org.smecalculus.bezmen.service.spec.SepulkaService; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/construction/SepulkaDaoBeans.java b/apps/foo/src/test/java/org/smecalculus/bezmen/construction/spec/SepulkaDaoBeans.java similarity index 74% rename from apps/foo/src/test/java/org/smecalculus/bezmen/construction/SepulkaDaoBeans.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/construction/spec/SepulkaDaoBeans.java index 9ae2af24..5e24f019 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/construction/SepulkaDaoBeans.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/construction/spec/SepulkaDaoBeans.java @@ -1,24 +1,24 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import static java.util.stream.Collectors.joining; -import static org.smecalculus.bezmen.modeling.OrmMode.MY_BATIS; -import static org.smecalculus.bezmen.modeling.OrmMode.SPRING_DATA; -import static org.smecalculus.bezmen.modeling.VendorMode.POSTGRES; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.MY_BATIS; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.SPRING_DATA; +import static org.smecalculus.bezmen.configuration.spec.VendorMode.POSTGRES; import java.util.Collection; import java.util.List; import java.util.stream.Stream; import javax.sql.DataSource; -import org.smecalculus.bezmen.data.SepulkaDao; -import org.smecalculus.bezmen.data.SepulkaDaoMyBatis; -import org.smecalculus.bezmen.data.SepulkaDaoSpringData; -import org.smecalculus.bezmen.data.SepulkaRecMapper; -import org.smecalculus.bezmen.data.SepulkaRecMapperImpl; -import org.smecalculus.bezmen.data.mybatis.SepulkaSqlMapper; -import org.smecalculus.bezmen.data.springdata.SepulkaRepository; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.modeling.OrmProps; -import org.smecalculus.bezmen.modeling.VendorProps; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.configuration.spec.OrmProps; +import org.smecalculus.bezmen.configuration.spec.VendorProps; +import org.smecalculus.bezmen.data.impl.SepulkaDaoMyBatis; +import org.smecalculus.bezmen.data.impl.SepulkaDaoSpringData; +import org.smecalculus.bezmen.data.spec.SepulkaDao; +import org.smecalculus.bezmen.data.spec.SepulkaRecMapper; +import org.smecalculus.bezmen.data.spec.SepulkaRecMapperImpl; +import org.smecalculus.bezmen.data.spec.mybatis.SepulkaSqlMapper; +import org.smecalculus.bezmen.data.spec.springdata.SepulkaRepository; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoIT.java b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoIT.java similarity index 84% rename from apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoIT.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoIT.java index 20b73f8c..ec25de3f 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoIT.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoIT.java @@ -1,12 +1,13 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.impl; import static org.assertj.core.api.Assertions.assertThat; import static org.smecalculus.bezmen.fixture.SepulkaFixtures.sepulkaBuilder; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.smecalculus.bezmen.construction.SepulkaDaoBeans; -import org.smecalculus.bezmen.modeling.Sepulka; +import org.smecalculus.bezmen.construction.spec.SepulkaDaoBeans; +import org.smecalculus.bezmen.data.spec.SepulkaDao; +import org.smecalculus.bezmen.service.spec.Sepulka; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.jdbc.Sql; diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatisPostgresIT.java b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatisPostgresIT.java similarity index 56% rename from apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatisPostgresIT.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatisPostgresIT.java index 72f5f00b..04d1290c 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatisPostgresIT.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatisPostgresIT.java @@ -1,7 +1,7 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.impl; -import org.smecalculus.bezmen.construction.OrmMyBatisBeans; -import org.smecalculus.bezmen.construction.SepulkaDaoBeans; +import org.smecalculus.bezmen.construction.spec.OrmMyBatisBeans; +import org.smecalculus.bezmen.construction.spec.SepulkaDaoBeans; import org.springframework.test.context.ContextConfiguration; @ContextConfiguration(classes = {SepulkaDaoBeans.MyBatisPostgres.class, OrmMyBatisBeans.class}) diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatisTest.java b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatisTest.java similarity index 74% rename from apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatisTest.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatisTest.java index 682cd3ec..49475551 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoMyBatisTest.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoMyBatisTest.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.impl; import org.junit.jupiter.api.Test; diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoSpringDataPostgresIT.java b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoSpringDataPostgresIT.java similarity index 57% rename from apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoSpringDataPostgresIT.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoSpringDataPostgresIT.java index 1ce2c70a..f6679901 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/data/SepulkaDaoSpringDataPostgresIT.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/data/impl/SepulkaDaoSpringDataPostgresIT.java @@ -1,7 +1,7 @@ -package org.smecalculus.bezmen.data; +package org.smecalculus.bezmen.data.impl; -import org.smecalculus.bezmen.construction.OrmSpringDataBeans; -import org.smecalculus.bezmen.construction.SepulkaDaoBeans; +import org.smecalculus.bezmen.construction.spec.OrmSpringDataBeans; +import org.smecalculus.bezmen.construction.spec.SepulkaDaoBeans; import org.springframework.test.context.ContextConfiguration; @ContextConfiguration(classes = {SepulkaDaoBeans.SpringDataPostgres.class, OrmSpringDataBeans.class}) diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientIT.java b/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientIT.java similarity index 81% rename from apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientIT.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientIT.java index ae2c89df..3bdde13e 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientIT.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientIT.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.impl; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; @@ -10,8 +10,11 @@ import java.util.UUID; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.smecalculus.bezmen.construction.SepulkaClientBeans; -import org.smecalculus.bezmen.modeling.SepulkaService; +import org.smecalculus.bezmen.construction.spec.SepulkaClientBeans; +import org.smecalculus.bezmen.messaging.spec.SepulkaClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; +import org.smecalculus.bezmen.service.spec.SepulkaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientSpringWeb.java b/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientSpringWeb.java similarity index 69% rename from apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientSpringWeb.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientSpringWeb.java index 862c07ee..e3cb53eb 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientSpringWeb.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientSpringWeb.java @@ -1,6 +1,11 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.impl; import lombok.NonNull; +import org.smecalculus.bezmen.messaging.spec.SepulkaClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaMsgMapper; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegResMsg; import org.springframework.http.MediaType; import org.springframework.test.web.reactive.server.WebTestClient; diff --git a/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientSpringWebIT.java b/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientSpringWebIT.java similarity index 58% rename from apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientSpringWebIT.java rename to apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientSpringWebIT.java index 6052d828..d8bb7319 100644 --- a/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/SepulkaClientSpringWebIT.java +++ b/apps/foo/src/test/java/org/smecalculus/bezmen/messaging/impl/SepulkaClientSpringWebIT.java @@ -1,3 +1,3 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.impl; public class SepulkaClientSpringWebIT extends SepulkaClientIT {} diff --git a/apps/pom.xml b/apps/pom.xml index cc02736b..d5efc954 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -179,7 +179,7 @@ - 2.35.0 + 2.36.0 diff --git a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/BezmenClientJavaHttp.java b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/impl/BezmenClientJavaHttp.java similarity index 89% rename from libs/client/src/main/java/org/smecalculus/bezmen/messaging/BezmenClientJavaHttp.java rename to libs/client/src/main/java/org/smecalculus/bezmen/messaging/impl/BezmenClientJavaHttp.java index ef17ee63..3216bc5c 100644 --- a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/BezmenClientJavaHttp.java +++ b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/impl/BezmenClientJavaHttp.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.impl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -9,6 +9,9 @@ import java.net.http.HttpRequest.BodyPublishers; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; +import org.smecalculus.bezmen.messaging.spec.BezmenClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; public record BezmenClientJavaHttp(ObjectMapper mapper, HttpClient client) implements BezmenClient { diff --git a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/BezmenClient.java b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/BezmenClient.java similarity index 52% rename from libs/client/src/main/java/org/smecalculus/bezmen/messaging/BezmenClient.java rename to libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/BezmenClient.java index f6f6f56c..af90f368 100644 --- a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/BezmenClient.java +++ b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/BezmenClient.java @@ -1,3 +1,3 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; public interface BezmenClient extends FooClient {} diff --git a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/FooClient.java b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/FooClient.java similarity index 59% rename from libs/client/src/main/java/org/smecalculus/bezmen/messaging/FooClient.java rename to libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/FooClient.java index 6cef3ff8..2e014416 100644 --- a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/FooClient.java +++ b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/FooClient.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; interface FooClient extends SepulkaClient { boolean isReady(); diff --git a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClient.java b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaClient.java similarity index 64% rename from libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClient.java rename to libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaClient.java index 1584998c..fea8e86d 100644 --- a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaClient.java +++ b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaClient.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; public interface SepulkaClient { SepulkaRegRes register(SepulkaRegReq request); diff --git a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegReq.java b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegReq.java similarity index 62% rename from libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegReq.java rename to libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegReq.java index e61ecb81..197535ae 100644 --- a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegReq.java +++ b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegReq.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; import lombok.NonNull; diff --git a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegRes.java b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegRes.java similarity index 71% rename from libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegRes.java rename to libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegRes.java index 17eda736..69067ba3 100644 --- a/libs/client/src/main/java/org/smecalculus/bezmen/messaging/SepulkaRegRes.java +++ b/libs/client/src/main/java/org/smecalculus/bezmen/messaging/spec/SepulkaRegRes.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.messaging; +package org.smecalculus.bezmen.messaging.spec; import java.util.UUID; import lombok.NonNull; diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigMode.java b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigMode.java deleted file mode 100644 index d5328016..00000000 --- a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigMode.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.smecalculus.bezmen.configuration; - -public enum ConfigMode { - FILE_SYSTEM -} diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigKeeperLightbendConfig.java b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/impl/ConfigKeeperLightbendConfig.java similarity index 73% rename from libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigKeeperLightbendConfig.java rename to libs/core/src/main/java/org/smecalculus/bezmen/configuration/impl/ConfigKeeperLightbendConfig.java index 180e72f1..47f5519a 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigKeeperLightbendConfig.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/impl/ConfigKeeperLightbendConfig.java @@ -1,7 +1,8 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.impl; import com.typesafe.config.Config; import com.typesafe.config.ConfigBeanFactory; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; public record ConfigKeeperLightbendConfig(Config config) implements ConfigKeeper { diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigKeeper.java b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigKeeper.java similarity index 60% rename from libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigKeeper.java rename to libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigKeeper.java index 719d99a5..92350525 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/ConfigKeeper.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigKeeper.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; public interface ConfigKeeper { T read(String key, Class type); diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigMode.java b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigMode.java new file mode 100644 index 00000000..8a167f27 --- /dev/null +++ b/libs/core/src/main/java/org/smecalculus/bezmen/configuration/spec/ConfigMode.java @@ -0,0 +1,5 @@ +package org.smecalculus.bezmen.configuration.spec; + +public enum ConfigMode { + FILE_SYSTEM +} diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/construction/ConfigBeans.java b/libs/core/src/main/java/org/smecalculus/bezmen/construction/spec/ConfigBeans.java similarity index 68% rename from libs/core/src/main/java/org/smecalculus/bezmen/construction/ConfigBeans.java rename to libs/core/src/main/java/org/smecalculus/bezmen/construction/spec/ConfigBeans.java index 78177cca..0f11dc80 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/construction/ConfigBeans.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/construction/spec/ConfigBeans.java @@ -1,9 +1,9 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import com.typesafe.config.ConfigFactory; -import org.smecalculus.bezmen.configuration.ConfigKeeper; -import org.smecalculus.bezmen.configuration.ConfigKeeperLightbendConfig; -import org.smecalculus.bezmen.configuration.ConfigMode; +import org.smecalculus.bezmen.configuration.impl.ConfigKeeperLightbendConfig; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; +import org.smecalculus.bezmen.configuration.spec.ConfigMode; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/construction/ValidationBeans.java b/libs/core/src/main/java/org/smecalculus/bezmen/construction/spec/ValidationBeans.java similarity index 71% rename from libs/core/src/main/java/org/smecalculus/bezmen/construction/ValidationBeans.java rename to libs/core/src/main/java/org/smecalculus/bezmen/construction/spec/ValidationBeans.java index 2ea76fa9..ad9f5c2f 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/construction/ValidationBeans.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/construction/spec/ValidationBeans.java @@ -1,9 +1,9 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import jakarta.validation.Validation; import jakarta.validation.ValidatorFactory; -import org.smecalculus.bezmen.validation.BezmenValidator; -import org.smecalculus.bezmen.validation.BezmenValidatorHibernateValidator; +import org.smecalculus.bezmen.validation.impl.BezmenValidatorHibernateValidator; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaConverter.java b/libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaConverter.java deleted file mode 100644 index afd58d9e..00000000 --- a/libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaConverter.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.smecalculus.bezmen.modeling; - -import org.smecalculus.bezmen.messaging.SepulkaRegRes; - -public interface SepulkaConverter { - SepulkaRegRes toRegRes(Sepulka sepulka); -} diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/modeling/Sepulka.java b/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/Sepulka.java similarity index 76% rename from libs/core/src/main/java/org/smecalculus/bezmen/modeling/Sepulka.java rename to libs/core/src/main/java/org/smecalculus/bezmen/service/spec/Sepulka.java index f970c8a9..644a8666 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/modeling/Sepulka.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/Sepulka.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.service.spec; import java.util.UUID; import lombok.Builder; diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaConverter.java b/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaConverter.java new file mode 100644 index 00000000..71afae22 --- /dev/null +++ b/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaConverter.java @@ -0,0 +1,7 @@ +package org.smecalculus.bezmen.service.spec; + +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; + +public interface SepulkaConverter { + SepulkaRegRes toRegRes(Sepulka sepulka); +} diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaService.java b/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaService.java similarity index 58% rename from libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaService.java rename to libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaService.java index fde4d4d0..f5e66ba7 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/modeling/SepulkaService.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/service/spec/SepulkaService.java @@ -1,7 +1,7 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.service.spec; import java.util.List; -import org.smecalculus.bezmen.messaging.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; public interface SepulkaService { Sepulka register(SepulkaRegReq sepulkaRegReq); diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/validation/BezmenValidatorHibernateValidator.java b/libs/core/src/main/java/org/smecalculus/bezmen/validation/impl/BezmenValidatorHibernateValidator.java similarity index 83% rename from libs/core/src/main/java/org/smecalculus/bezmen/validation/BezmenValidatorHibernateValidator.java rename to libs/core/src/main/java/org/smecalculus/bezmen/validation/impl/BezmenValidatorHibernateValidator.java index be53cf75..c7b5adf4 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/validation/BezmenValidatorHibernateValidator.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/validation/impl/BezmenValidatorHibernateValidator.java @@ -1,10 +1,11 @@ -package org.smecalculus.bezmen.validation; +package org.smecalculus.bezmen.validation.impl; import jakarta.validation.ConstraintViolation; import jakarta.validation.ConstraintViolationException; import jakarta.validation.Validator; import java.util.Set; import lombok.NonNull; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; public record BezmenValidatorHibernateValidator(@NonNull Validator validator) implements BezmenValidator { diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/validation/ValueOfEnumValidator.java b/libs/core/src/main/java/org/smecalculus/bezmen/validation/impl/ValueOfEnumValidator.java similarity index 90% rename from libs/core/src/main/java/org/smecalculus/bezmen/validation/ValueOfEnumValidator.java rename to libs/core/src/main/java/org/smecalculus/bezmen/validation/impl/ValueOfEnumValidator.java index 889013a3..0200508e 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/validation/ValueOfEnumValidator.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/validation/impl/ValueOfEnumValidator.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.validation; +package org.smecalculus.bezmen.validation.impl; import static java.lang.String.format; import static java.util.stream.Collectors.toSet; @@ -7,6 +7,7 @@ import jakarta.validation.ConstraintValidatorContext; import java.util.Set; import java.util.stream.Stream; +import org.smecalculus.bezmen.validation.spec.ValueOfEnum; public class ValueOfEnumValidator implements ConstraintValidator { private Set allowedValues; diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/validation/BezmenValidator.java b/libs/core/src/main/java/org/smecalculus/bezmen/validation/spec/BezmenValidator.java similarity index 65% rename from libs/core/src/main/java/org/smecalculus/bezmen/validation/BezmenValidator.java rename to libs/core/src/main/java/org/smecalculus/bezmen/validation/spec/BezmenValidator.java index 176a1401..00cbfadb 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/validation/BezmenValidator.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/validation/spec/BezmenValidator.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.validation; +package org.smecalculus.bezmen.validation.spec; public interface BezmenValidator { void validate(T object, Class... groups); diff --git a/libs/core/src/main/java/org/smecalculus/bezmen/validation/ValueOfEnum.java b/libs/core/src/main/java/org/smecalculus/bezmen/validation/spec/ValueOfEnum.java similarity index 85% rename from libs/core/src/main/java/org/smecalculus/bezmen/validation/ValueOfEnum.java rename to libs/core/src/main/java/org/smecalculus/bezmen/validation/spec/ValueOfEnum.java index 7bd86134..a9c781aa 100644 --- a/libs/core/src/main/java/org/smecalculus/bezmen/validation/ValueOfEnum.java +++ b/libs/core/src/main/java/org/smecalculus/bezmen/validation/spec/ValueOfEnum.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.validation; +package org.smecalculus.bezmen.validation.spec; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.TYPE_USE; @@ -8,6 +8,7 @@ import jakarta.validation.Payload; import java.lang.annotation.Retention; import java.lang.annotation.Target; +import org.smecalculus.bezmen.validation.impl.ValueOfEnumValidator; @Target({FIELD, TYPE_USE}) @Retention(RUNTIME) diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/OrmPropsCfg.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/OrmPropsCfg.java deleted file mode 100644 index 7ad556e4..00000000 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/OrmPropsCfg.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.smecalculus.bezmen.configuration; - -import lombok.Data; -import org.smecalculus.bezmen.modeling.OrmMode; -import org.smecalculus.bezmen.validation.ValueOfEnum; - -@Data -public class OrmPropsCfg { - - @ValueOfEnum(OrmMode.class) - private String mode; -} diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataConfigImpl.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/impl/DataConfigImpl.java similarity index 58% rename from libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataConfigImpl.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/impl/DataConfigImpl.java index b9674b95..bec7f787 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataConfigImpl.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/impl/DataConfigImpl.java @@ -1,11 +1,14 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.impl; import lombok.NonNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.smecalculus.bezmen.modeling.DataConfig; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; +import org.smecalculus.bezmen.configuration.spec.DataCfgMapper; +import org.smecalculus.bezmen.configuration.spec.DataConfig; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.configuration.spec.DataPropsCfg; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; public record DataConfigImpl( @NonNull ConfigKeeper configKeeper, @NonNull BezmenValidator validator, @NonNull DataCfgMapper mapper) diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataCfgMapper.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataCfgMapper.java similarity index 70% rename from libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataCfgMapper.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataCfgMapper.java index 04dd58ed..e61abea0 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataCfgMapper.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataCfgMapper.java @@ -1,12 +1,7 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import org.mapstruct.Mapper; import org.mapstruct.Mapping; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.modeling.OrmMode; -import org.smecalculus.bezmen.modeling.OrmProps; -import org.smecalculus.bezmen.modeling.VendorMode; -import org.smecalculus.bezmen.modeling.VendorProps; @Mapper public interface DataCfgMapper { diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/DataConfig.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataConfig.java similarity index 55% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/DataConfig.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataConfig.java index 802b83bc..26497d7c 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/DataConfig.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataConfig.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; public interface DataConfig { DataProps getDataProps(); diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/DataProps.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataProps.java similarity index 74% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/DataProps.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataProps.java index 2362f550..7856e355 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/DataProps.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; import lombok.NonNull; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataPropsCfg.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataPropsCfg.java similarity index 78% rename from libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataPropsCfg.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataPropsCfg.java index f9405b58..8d7cbf59 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/DataPropsCfg.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/DataPropsCfg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import jakarta.validation.constraints.NotNull; import lombok.Data; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/H2Props.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/H2Props.java similarity index 79% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/H2Props.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/H2Props.java index b0dd4e99..e38e713c 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/H2Props.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/H2Props.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; import lombok.NonNull; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/H2PropsCfg.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/H2PropsCfg.java similarity index 80% rename from libs/data/src/main/java/org/smecalculus/bezmen/configuration/H2PropsCfg.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/H2PropsCfg.java index 393867d1..b8a55f23 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/H2PropsCfg.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/H2PropsCfg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/OrmMode.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmMode.java similarity index 51% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/OrmMode.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmMode.java index 82ab3a86..358a13cc 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/OrmMode.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmMode.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; public enum OrmMode { SPRING_DATA, diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/OrmProps.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmProps.java similarity index 59% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/OrmProps.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmProps.java index 15521058..fdf1b87a 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/OrmProps.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmPropsCfg.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmPropsCfg.java new file mode 100644 index 00000000..8f76159d --- /dev/null +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/OrmPropsCfg.java @@ -0,0 +1,11 @@ +package org.smecalculus.bezmen.configuration.spec; + +import lombok.Data; +import org.smecalculus.bezmen.validation.spec.ValueOfEnum; + +@Data +public class OrmPropsCfg { + + @ValueOfEnum(OrmMode.class) + private String mode; +} diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/PostgresProps.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/PostgresProps.java similarity index 80% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/PostgresProps.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/PostgresProps.java index 006cf728..70b6c1c4 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/PostgresProps.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/PostgresProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; import lombok.NonNull; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/PostgresPropsCfg.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/PostgresPropsCfg.java similarity index 83% rename from libs/data/src/main/java/org/smecalculus/bezmen/configuration/PostgresPropsCfg.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/PostgresPropsCfg.java index f38cb702..2a791b57 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/PostgresPropsCfg.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/PostgresPropsCfg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorMode.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorMode.java new file mode 100644 index 00000000..8a2839c3 --- /dev/null +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorMode.java @@ -0,0 +1,6 @@ +package org.smecalculus.bezmen.configuration.spec; + +public enum VendorMode { + H2, + POSTGRES +} diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorProps.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorProps.java similarity index 81% rename from libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorProps.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorProps.java index baa95cc5..0ab3d24d 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorProps.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.modeling; +package org.smecalculus.bezmen.configuration.spec; import edu.umd.cs.findbugs.annotations.Nullable; import lombok.Builder; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/VendorPropsCfg.java b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorPropsCfg.java similarity index 60% rename from libs/data/src/main/java/org/smecalculus/bezmen/configuration/VendorPropsCfg.java rename to libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorPropsCfg.java index 30d0df7e..ddbc5945 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/configuration/VendorPropsCfg.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/configuration/spec/VendorPropsCfg.java @@ -1,9 +1,8 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import com.typesafe.config.Optional; import lombok.Data; -import org.smecalculus.bezmen.modeling.VendorMode; -import org.smecalculus.bezmen.validation.ValueOfEnum; +import org.smecalculus.bezmen.validation.spec.ValueOfEnum; @Data public class VendorPropsCfg { diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/construction/ConditionalOnOrmMode.java b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/ConditionalOnOrmMode.java similarity index 79% rename from libs/data/src/main/java/org/smecalculus/bezmen/construction/ConditionalOnOrmMode.java rename to libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/ConditionalOnOrmMode.java index 7688395c..36758a8b 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/construction/ConditionalOnOrmMode.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/ConditionalOnOrmMode.java @@ -1,10 +1,10 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.smecalculus.bezmen.modeling.OrmMode; +import org.smecalculus.bezmen.configuration.spec.OrmMode; import org.springframework.context.annotation.Conditional; @Target({ElementType.TYPE, ElementType.METHOD}) diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/construction/DataBeans.java b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/DataBeans.java similarity index 82% rename from libs/data/src/main/java/org/smecalculus/bezmen/construction/DataBeans.java rename to libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/DataBeans.java index 96efda71..85e9c441 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/construction/DataBeans.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/DataBeans.java @@ -1,10 +1,10 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import javax.sql.DataSource; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.modeling.H2Props; -import org.smecalculus.bezmen.modeling.PostgresProps; -import org.smecalculus.bezmen.modeling.VendorProps; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.configuration.spec.H2Props; +import org.smecalculus.bezmen.configuration.spec.PostgresProps; +import org.smecalculus.bezmen.configuration.spec.VendorProps; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/construction/DataConfigBeans.java b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/DataConfigBeans.java similarity index 53% rename from libs/data/src/main/java/org/smecalculus/bezmen/construction/DataConfigBeans.java rename to libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/DataConfigBeans.java index 5cca01f0..c0f388fb 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/construction/DataConfigBeans.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/DataConfigBeans.java @@ -1,12 +1,12 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; -import org.smecalculus.bezmen.configuration.ConfigKeeper; -import org.smecalculus.bezmen.configuration.DataCfgMapper; -import org.smecalculus.bezmen.configuration.DataCfgMapperImpl; -import org.smecalculus.bezmen.configuration.DataConfigImpl; -import org.smecalculus.bezmen.modeling.DataConfig; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.configuration.impl.DataConfigImpl; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; +import org.smecalculus.bezmen.configuration.spec.DataCfgMapper; +import org.smecalculus.bezmen.configuration.spec.DataCfgMapperImpl; +import org.smecalculus.bezmen.configuration.spec.DataConfig; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmModeCondition.java b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmModeCondition.java similarity index 84% rename from libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmModeCondition.java rename to libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmModeCondition.java index a7743b19..074aa3eb 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmModeCondition.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmModeCondition.java @@ -1,10 +1,10 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import static org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase.REGISTER_BEAN; import java.util.Map; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.modeling.OrmMode; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.configuration.spec.OrmMode; import org.springframework.context.annotation.ConditionContext; import org.springframework.context.annotation.ConfigurationCondition; import org.springframework.core.type.AnnotatedTypeMetadata; diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmMyBatisBeans.java b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmMyBatisBeans.java similarity index 77% rename from libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmMyBatisBeans.java rename to libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmMyBatisBeans.java index 6600e6f7..183160e8 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmMyBatisBeans.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmMyBatisBeans.java @@ -1,6 +1,6 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; -import static org.smecalculus.bezmen.modeling.OrmMode.MY_BATIS; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.MY_BATIS; import javax.sql.DataSource; import org.apache.ibatis.session.SqlSessionFactory; @@ -11,7 +11,7 @@ @Configuration(proxyBeanMethods = false) @ConditionalOnOrmMode(MY_BATIS) -@MapperScan("org.smecalculus.bezmen.data.mybatis") +@MapperScan(basePackages = "org.smecalculus.bezmen.data.spec.mybatis") public class OrmMyBatisBeans { @Bean diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmSpringDataBeans.java b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmSpringDataBeans.java similarity index 82% rename from libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmSpringDataBeans.java rename to libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmSpringDataBeans.java index 9feedc6f..b649cdbd 100644 --- a/libs/data/src/main/java/org/smecalculus/bezmen/construction/OrmSpringDataBeans.java +++ b/libs/data/src/main/java/org/smecalculus/bezmen/construction/spec/OrmSpringDataBeans.java @@ -1,10 +1,10 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; -import static org.smecalculus.bezmen.modeling.OrmMode.SPRING_DATA; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.SPRING_DATA; import javax.sql.DataSource; -import org.smecalculus.bezmen.modeling.DataProps; -import org.smecalculus.bezmen.modeling.VendorProps; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.configuration.spec.VendorProps; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration; @@ -18,7 +18,7 @@ @Configuration(proxyBeanMethods = false) @ConditionalOnOrmMode(SPRING_DATA) -@EnableJdbcRepositories("org.smecalculus.bezmen.data.springdata") +@EnableJdbcRepositories("org.smecalculus.bezmen.data.spec.springdata") public class OrmSpringDataBeans extends AbstractJdbcConfiguration { @Bean diff --git a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorMode.java b/libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorMode.java deleted file mode 100644 index 126960dc..00000000 --- a/libs/data/src/main/java/org/smecalculus/bezmen/modeling/VendorMode.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.smecalculus.bezmen.modeling; - -public enum VendorMode { - H2, - POSTGRES -} diff --git a/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigIT.java b/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigIT.java index 30f48240..24140b3e 100644 --- a/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigIT.java +++ b/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigIT.java @@ -5,11 +5,11 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.smecalculus.bezmen.construction.ConfigBeans; -import org.smecalculus.bezmen.construction.DataConfigBeans; -import org.smecalculus.bezmen.construction.ValidationBeans; -import org.smecalculus.bezmen.modeling.DataConfig; -import org.smecalculus.bezmen.modeling.DataProps; +import org.smecalculus.bezmen.configuration.spec.DataConfig; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.construction.spec.ConfigBeans; +import org.smecalculus.bezmen.construction.spec.DataConfigBeans; +import org.smecalculus.bezmen.construction.spec.ValidationBeans; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigTest.java b/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigTest.java index af7ce5c3..9238a666 100644 --- a/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigTest.java +++ b/libs/data/src/test/java/org/smecalculus/bezmen/configuration/DataConfigTest.java @@ -7,8 +7,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.smecalculus.bezmen.modeling.DataConfig; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.configuration.impl.DataConfigImpl; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; +import org.smecalculus.bezmen.configuration.spec.DataCfgMapperImpl; +import org.smecalculus.bezmen.configuration.spec.DataConfig; +import org.smecalculus.bezmen.configuration.spec.DataPropsCfg; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; abstract class DataConfigTest { diff --git a/libs/data/src/test/java/org/smecalculus/bezmen/fixture/DataPropsFixture.java b/libs/data/src/test/java/org/smecalculus/bezmen/fixture/DataPropsFixture.java index 193ac9e6..dbfbdbbe 100644 --- a/libs/data/src/test/java/org/smecalculus/bezmen/fixture/DataPropsFixture.java +++ b/libs/data/src/test/java/org/smecalculus/bezmen/fixture/DataPropsFixture.java @@ -5,8 +5,8 @@ import static org.smecalculus.bezmen.fixture.VendorPropsFixture.vendorProps; import static org.smecalculus.bezmen.fixture.VendorPropsFixture.vendorPropsCfg; -import org.smecalculus.bezmen.configuration.DataPropsCfg; -import org.smecalculus.bezmen.modeling.DataProps; +import org.smecalculus.bezmen.configuration.spec.DataProps; +import org.smecalculus.bezmen.configuration.spec.DataPropsCfg; public class DataPropsFixture { diff --git a/libs/data/src/test/java/org/smecalculus/bezmen/fixture/OrmPropsFixture.java b/libs/data/src/test/java/org/smecalculus/bezmen/fixture/OrmPropsFixture.java index db52161c..c876c820 100644 --- a/libs/data/src/test/java/org/smecalculus/bezmen/fixture/OrmPropsFixture.java +++ b/libs/data/src/test/java/org/smecalculus/bezmen/fixture/OrmPropsFixture.java @@ -1,9 +1,9 @@ package org.smecalculus.bezmen.fixture; -import static org.smecalculus.bezmen.modeling.OrmMode.SPRING_DATA; +import static org.smecalculus.bezmen.configuration.spec.OrmMode.SPRING_DATA; -import org.smecalculus.bezmen.configuration.OrmPropsCfg; -import org.smecalculus.bezmen.modeling.OrmProps; +import org.smecalculus.bezmen.configuration.spec.OrmProps; +import org.smecalculus.bezmen.configuration.spec.OrmPropsCfg; public class OrmPropsFixture { diff --git a/libs/data/src/test/java/org/smecalculus/bezmen/fixture/VendorPropsFixture.java b/libs/data/src/test/java/org/smecalculus/bezmen/fixture/VendorPropsFixture.java index 31dbecf8..30a09456 100644 --- a/libs/data/src/test/java/org/smecalculus/bezmen/fixture/VendorPropsFixture.java +++ b/libs/data/src/test/java/org/smecalculus/bezmen/fixture/VendorPropsFixture.java @@ -1,9 +1,9 @@ package org.smecalculus.bezmen.fixture; -import org.smecalculus.bezmen.configuration.VendorPropsCfg; -import org.smecalculus.bezmen.modeling.H2Props; -import org.smecalculus.bezmen.modeling.VendorMode; -import org.smecalculus.bezmen.modeling.VendorProps; +import org.smecalculus.bezmen.configuration.spec.H2Props; +import org.smecalculus.bezmen.configuration.spec.VendorMode; +import org.smecalculus.bezmen.configuration.spec.VendorProps; +import org.smecalculus.bezmen.configuration.spec.VendorPropsCfg; public class VendorPropsFixture { public static VendorProps.Builder vendorProps() { diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProtocol.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProtocol.java deleted file mode 100644 index e81177e8..00000000 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProtocol.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.smecalculus.bezmen.configuration; - -public enum MessagingProtocol { - HTTP -} diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebMode.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebMode.java deleted file mode 100644 index 408130f6..00000000 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebMode.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.smecalculus.bezmen.configuration; - -public enum WebMode { - SPRING_MVC -} diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebPropsCfg.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebPropsCfg.java deleted file mode 100644 index 40ff44ca..00000000 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebPropsCfg.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.smecalculus.bezmen.configuration; - -import lombok.Data; -import org.smecalculus.bezmen.validation.ValueOfEnum; - -@Data -public class WebPropsCfg { - - @ValueOfEnum(WebMode.class) - String mode; -} diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingConfigImpl.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/impl/MessagingConfigImpl.java similarity index 58% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingConfigImpl.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/impl/MessagingConfigImpl.java index 07e481dc..bd070a34 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingConfigImpl.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/impl/MessagingConfigImpl.java @@ -1,9 +1,14 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.impl; import lombok.NonNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; +import org.smecalculus.bezmen.configuration.spec.MessagingCfgMapper; +import org.smecalculus.bezmen.configuration.spec.MessagingConfig; +import org.smecalculus.bezmen.configuration.spec.MessagingProps; +import org.smecalculus.bezmen.configuration.spec.MessagingPropsCfg; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; public record MessagingConfigImpl( @NonNull ConfigKeeper keeper, @NonNull BezmenValidator validator, @NonNull MessagingCfgMapper mapper) diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/HttpProps.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/HttpProps.java similarity index 68% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/HttpProps.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/HttpProps.java index 6e0e4869..d88152cd 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/HttpProps.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/HttpProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; import lombok.NonNull; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/HttpPropsCfg.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/HttpPropsCfg.java similarity index 73% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/HttpPropsCfg.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/HttpPropsCfg.java index d44142d6..cc5505ed 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/HttpPropsCfg.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/HttpPropsCfg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import jakarta.validation.constraints.NotNull; import lombok.Data; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingCfgMapper.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingCfgMapper.java similarity index 93% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingCfgMapper.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingCfgMapper.java index 4dd5eb32..241c9ba3 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingCfgMapper.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingCfgMapper.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import org.mapstruct.Mapper; import org.mapstruct.Mapping; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingConfig.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingConfig.java similarity index 60% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingConfig.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingConfig.java index 36dee259..f50bdd88 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingConfig.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingConfig.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; public interface MessagingConfig { MessagingProps getMessagingProps(); diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProps.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProps.java similarity index 71% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProps.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProps.java index 67031fe7..0fb8b686 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingProps.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; import lombok.NonNull; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingPropsCfg.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingPropsCfg.java similarity index 75% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingPropsCfg.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingPropsCfg.java index 89ac0d51..a222ccbf 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/MessagingPropsCfg.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingPropsCfg.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import jakarta.validation.constraints.NotNull; import lombok.Data; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProtocol.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProtocol.java new file mode 100644 index 00000000..fda2a612 --- /dev/null +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/MessagingProtocol.java @@ -0,0 +1,5 @@ +package org.smecalculus.bezmen.configuration.spec; + +public enum MessagingProtocol { + HTTP +} diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/ProtocolProps.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/ProtocolProps.java similarity index 81% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/ProtocolProps.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/ProtocolProps.java index 3c3bdc36..c0f37ef8 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/ProtocolProps.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/ProtocolProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import edu.umd.cs.findbugs.annotations.Nullable; import java.util.Set; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/ProtocolPropsCfg.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/ProtocolPropsCfg.java similarity index 75% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/ProtocolPropsCfg.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/ProtocolPropsCfg.java index 4bc8127e..b00585a1 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/ProtocolPropsCfg.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/ProtocolPropsCfg.java @@ -1,11 +1,11 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import com.typesafe.config.Optional; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import java.util.Set; import lombok.Data; -import org.smecalculus.bezmen.validation.ValueOfEnum; +import org.smecalculus.bezmen.validation.spec.ValueOfEnum; @Data public class ProtocolPropsCfg { diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebMode.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebMode.java new file mode 100644 index 00000000..8d829dea --- /dev/null +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebMode.java @@ -0,0 +1,5 @@ +package org.smecalculus.bezmen.configuration.spec; + +public enum WebMode { + SPRING_MVC +} diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebProps.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebProps.java similarity index 60% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebProps.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebProps.java index a44aed9f..58f3aa92 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/WebProps.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebProps.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.configuration; +package org.smecalculus.bezmen.configuration.spec; import lombok.Builder; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebPropsCfg.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebPropsCfg.java new file mode 100644 index 00000000..37f80ebe --- /dev/null +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/configuration/spec/WebPropsCfg.java @@ -0,0 +1,11 @@ +package org.smecalculus.bezmen.configuration.spec; + +import lombok.Data; +import org.smecalculus.bezmen.validation.spec.ValueOfEnum; + +@Data +public class WebPropsCfg { + + @ValueOfEnum(WebMode.class) + String mode; +} diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/ConditionalOnWebMode.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/ConditionalOnWebMode.java similarity index 79% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/construction/ConditionalOnWebMode.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/ConditionalOnWebMode.java index 88b76f33..2fc68603 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/ConditionalOnWebMode.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/ConditionalOnWebMode.java @@ -1,10 +1,10 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.smecalculus.bezmen.configuration.WebMode; +import org.smecalculus.bezmen.configuration.spec.WebMode; import org.springframework.context.annotation.Conditional; @Target({ElementType.TYPE, ElementType.METHOD}) diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/MessagingBeans.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/MessagingBeans.java similarity index 83% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/construction/MessagingBeans.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/MessagingBeans.java index b2bb5a0c..be82db07 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/MessagingBeans.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/MessagingBeans.java @@ -1,4 +1,4 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/MessagingConfigBeans.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/MessagingConfigBeans.java similarity index 54% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/construction/MessagingConfigBeans.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/MessagingConfigBeans.java index 30e8fea0..150f1aea 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/MessagingConfigBeans.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/MessagingConfigBeans.java @@ -1,12 +1,12 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; -import org.smecalculus.bezmen.configuration.ConfigKeeper; -import org.smecalculus.bezmen.configuration.MessagingCfgMapper; -import org.smecalculus.bezmen.configuration.MessagingCfgMapperImpl; -import org.smecalculus.bezmen.configuration.MessagingConfig; -import org.smecalculus.bezmen.configuration.MessagingConfigImpl; -import org.smecalculus.bezmen.configuration.MessagingProps; -import org.smecalculus.bezmen.validation.BezmenValidator; +import org.smecalculus.bezmen.configuration.impl.MessagingConfigImpl; +import org.smecalculus.bezmen.configuration.spec.ConfigKeeper; +import org.smecalculus.bezmen.configuration.spec.MessagingCfgMapper; +import org.smecalculus.bezmen.configuration.spec.MessagingCfgMapperImpl; +import org.smecalculus.bezmen.configuration.spec.MessagingConfig; +import org.smecalculus.bezmen.configuration.spec.MessagingProps; +import org.smecalculus.bezmen.validation.spec.BezmenValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/WebModeCondition.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/WebModeCondition.java similarity index 78% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/construction/WebModeCondition.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/WebModeCondition.java index b1aeef0a..dfa71a4e 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/WebModeCondition.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/WebModeCondition.java @@ -1,13 +1,13 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; import static java.util.Objects.nonNull; -import static org.smecalculus.bezmen.configuration.MessagingProtocol.HTTP; +import static org.smecalculus.bezmen.configuration.spec.MessagingProtocol.HTTP; import static org.springframework.context.annotation.ConfigurationCondition.ConfigurationPhase.REGISTER_BEAN; import java.util.Map; -import org.smecalculus.bezmen.configuration.HttpProps; -import org.smecalculus.bezmen.configuration.MessagingProps; -import org.smecalculus.bezmen.configuration.WebMode; +import org.smecalculus.bezmen.configuration.spec.HttpProps; +import org.smecalculus.bezmen.configuration.spec.MessagingProps; +import org.smecalculus.bezmen.configuration.spec.WebMode; import org.springframework.context.annotation.ConditionContext; import org.springframework.context.annotation.ConfigurationCondition; import org.springframework.core.type.AnnotatedTypeMetadata; diff --git a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/WebSpringMvcBeans.java b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/WebSpringMvcBeans.java similarity index 67% rename from libs/messaging/src/main/java/org/smecalculus/bezmen/construction/WebSpringMvcBeans.java rename to libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/WebSpringMvcBeans.java index 871817e9..04604ddf 100644 --- a/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/WebSpringMvcBeans.java +++ b/libs/messaging/src/main/java/org/smecalculus/bezmen/construction/spec/WebSpringMvcBeans.java @@ -1,6 +1,6 @@ -package org.smecalculus.bezmen.construction; +package org.smecalculus.bezmen.construction.spec; -import static org.smecalculus.bezmen.configuration.WebMode.SPRING_MVC; +import static org.smecalculus.bezmen.configuration.spec.WebMode.SPRING_MVC; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; diff --git a/libs/messaging/src/test/java/org/smecalculus/bezmen/configuration/MessagingConfigIT.java b/libs/messaging/src/test/java/org/smecalculus/bezmen/configuration/MessagingConfigIT.java index 08f041d9..4e4a860f 100644 --- a/libs/messaging/src/test/java/org/smecalculus/bezmen/configuration/MessagingConfigIT.java +++ b/libs/messaging/src/test/java/org/smecalculus/bezmen/configuration/MessagingConfigIT.java @@ -5,9 +5,11 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.smecalculus.bezmen.construction.ConfigBeans; -import org.smecalculus.bezmen.construction.MessagingConfigBeans; -import org.smecalculus.bezmen.construction.ValidationBeans; +import org.smecalculus.bezmen.configuration.spec.MessagingConfig; +import org.smecalculus.bezmen.configuration.spec.MessagingProps; +import org.smecalculus.bezmen.construction.spec.ConfigBeans; +import org.smecalculus.bezmen.construction.spec.MessagingConfigBeans; +import org.smecalculus.bezmen.construction.spec.ValidationBeans; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/HttpPropsFixture.java b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/HttpPropsFixture.java index 28ff4388..a767e5ec 100644 --- a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/HttpPropsFixture.java +++ b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/HttpPropsFixture.java @@ -2,7 +2,7 @@ import static org.smecalculus.bezmen.fixture.MvcPropsFixture.mvcProps; -import org.smecalculus.bezmen.configuration.HttpProps; +import org.smecalculus.bezmen.configuration.spec.HttpProps; public class HttpPropsFixture { public static HttpProps.Builder httpProps() { diff --git a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MessagingPropsFixture.java b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MessagingPropsFixture.java index aa2ef2ae..c9a078b0 100644 --- a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MessagingPropsFixture.java +++ b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MessagingPropsFixture.java @@ -2,7 +2,7 @@ import static org.smecalculus.bezmen.fixture.ProtocolPropsFixture.protocolProps; -import org.smecalculus.bezmen.configuration.MessagingProps; +import org.smecalculus.bezmen.configuration.spec.MessagingProps; public class MessagingPropsFixture { public static MessagingProps.Builder messagingProps() { diff --git a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MvcPropsFixture.java b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MvcPropsFixture.java index b5a85edb..58dc2c8b 100644 --- a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MvcPropsFixture.java +++ b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/MvcPropsFixture.java @@ -1,8 +1,8 @@ package org.smecalculus.bezmen.fixture; -import static org.smecalculus.bezmen.configuration.WebMode.SPRING_MVC; +import static org.smecalculus.bezmen.configuration.spec.WebMode.SPRING_MVC; -import org.smecalculus.bezmen.configuration.WebProps; +import org.smecalculus.bezmen.configuration.spec.WebProps; public class MvcPropsFixture { public static WebProps.Builder mvcProps() { diff --git a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/ProtocolPropsFixture.java b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/ProtocolPropsFixture.java index 1f921dff..aada4f90 100644 --- a/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/ProtocolPropsFixture.java +++ b/libs/messaging/src/test/java/org/smecalculus/bezmen/fixture/ProtocolPropsFixture.java @@ -1,10 +1,10 @@ package org.smecalculus.bezmen.fixture; -import static org.smecalculus.bezmen.configuration.MessagingProtocol.HTTP; +import static org.smecalculus.bezmen.configuration.spec.MessagingProtocol.HTTP; import static org.smecalculus.bezmen.fixture.HttpPropsFixture.httpProps; import java.util.Set; -import org.smecalculus.bezmen.configuration.ProtocolProps; +import org.smecalculus.bezmen.configuration.spec.ProtocolProps; public class ProtocolPropsFixture { public static ProtocolProps.Builder protocolProps() { diff --git a/libs/pom.xml b/libs/pom.xml index d2546984..388d378c 100644 --- a/libs/pom.xml +++ b/libs/pom.xml @@ -495,7 +495,7 @@ - 2.30.0 + 2.36.0 diff --git a/libs/testing/src/main/java/org/smecalculus/bezmen/fixture/SepulkaFixtures.java b/libs/testing/src/main/java/org/smecalculus/bezmen/fixture/SepulkaFixtures.java index ea4b409b..022bc575 100644 --- a/libs/testing/src/main/java/org/smecalculus/bezmen/fixture/SepulkaFixtures.java +++ b/libs/testing/src/main/java/org/smecalculus/bezmen/fixture/SepulkaFixtures.java @@ -1,9 +1,9 @@ package org.smecalculus.bezmen.fixture; import java.util.UUID; -import org.smecalculus.bezmen.messaging.SepulkaRegReq; -import org.smecalculus.bezmen.messaging.SepulkaRegRes; -import org.smecalculus.bezmen.modeling.Sepulka; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; +import org.smecalculus.bezmen.service.spec.Sepulka; public class SepulkaFixtures { public static final String NAME = "foo"; diff --git a/tests/e2e/src/main/java/org/smecalculus/bezmen/StandBeans.java b/tests/e2e/src/main/java/org/smecalculus/bezmen/StandBeans.java index 99880ec0..359cea21 100644 --- a/tests/e2e/src/main/java/org/smecalculus/bezmen/StandBeans.java +++ b/tests/e2e/src/main/java/org/smecalculus/bezmen/StandBeans.java @@ -2,8 +2,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import java.net.http.HttpClient; -import org.smecalculus.bezmen.messaging.BezmenClient; -import org.smecalculus.bezmen.messaging.BezmenClientJavaHttp; +import org.smecalculus.bezmen.messaging.impl.BezmenClientJavaHttp; +import org.smecalculus.bezmen.messaging.spec.BezmenClient; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/tests/e2e/src/test/java/org/smecalculus/bezmen/registration/SepulkaTest.java b/tests/e2e/src/test/java/org/smecalculus/bezmen/registration/SepulkaTest.java index 7601bbe3..84d8e7da 100644 --- a/tests/e2e/src/test/java/org/smecalculus/bezmen/registration/SepulkaTest.java +++ b/tests/e2e/src/test/java/org/smecalculus/bezmen/registration/SepulkaTest.java @@ -12,9 +12,9 @@ import org.junit.jupiter.api.condition.EnabledIfSystemProperty; import org.junit.jupiter.api.extension.ExtendWith; import org.smecalculus.bezmen.StandBeans; -import org.smecalculus.bezmen.messaging.BezmenClient; -import org.smecalculus.bezmen.messaging.SepulkaRegReq; -import org.smecalculus.bezmen.messaging.SepulkaRegRes; +import org.smecalculus.bezmen.messaging.spec.BezmenClient; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegReq; +import org.smecalculus.bezmen.messaging.spec.SepulkaRegRes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/tests/pom.xml b/tests/pom.xml index 239ad146..9f408517 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -114,7 +114,7 @@ - 2.30.0 + 2.36.0