[
  {
    "path": ".gitattributes",
    "content": ".githooks/** linguist-vendored\ngradlew linguist-vendored\n"
  },
  {
    "path": ".githooks/pre-commit",
    "content": "#!/bin/bash\n\nGIT_DIR=$(git rev-parse --show-toplevel)\n$GIT_DIR/gradlew checkFormat\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\non:\n  push:\n    branches: [ \"main\" ]\n  pull_request:\n    branches: [ \"main\" ]\n\npermissions:\n  contents: read\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/checkout@v3\n      - name: Set up JDK\n        uses: actions/setup-java@v3\n        with:\n          java-version: '21'\n          distribution: 'adopt'\n      - name: Lint\n        uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1\n        with:\n          arguments: checkFormat\n      - name: Test\n        uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1\n        with:\n          arguments: test\n"
  },
  {
    "path": ".gitignore",
    "content": ".gradle\nbuild/\n!gradle/wrapper/gradle-wrapper.jar\n!**/src/main/**\n!**/src/test/**\n\n### IDEA ###\n.idea\n*.iws\n*.iml\n*.ipr\nout/\n"
  },
  {
    "path": ".springjavaformatconfig",
    "content": "indentation-style=spaces"
  },
  {
    "path": "LICENCE.md",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# SpringBoot Java Template\n\n[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Fgeminikims)](https://twitter.com/geminikims)\n[![Youtube](https://img.shields.io/youtube/channel/views/UCDh8zEDofOcrOMAOnSVL9Tg?label=Youtube&style=social)](https://www.youtube.com/@geminikims)\n[![CI](https://github.com/team-dodn/spring-boot-java-template/actions/workflows/ci.yml/badge.svg)](https://github.com/team-dodn/spring-boot-java-template/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\nThis is not the best structure. This is a good basic structure to use early in the project when productivity is important.\n\nRemember, as your software grows, your structure must grow too.\n\n# **Modules**\n\n## Core\nEach submodule of this module is responsible for one domain service.\n\nThis must make the modular structure grow with the growth of the service.\n\n### core:core-api\nIt is the only executable module in the project. It is structured to have domains to maximize initial development productivity.\n\nIt is also responsible for providing APIs and setting up frameworks for services.\n\n### core:core-enum\n\nThis module contains enums that are used by `core-api` and must be delivered to external modules.\n\n<br/>\n\n## Clients\nSubmodules of this module are responsible for integrating with external systems.\n\n### clients:clients-example\nThis module shows an example of HTTP communication with `Spring-Cloud-Open-Feign`.\n\n<br/>\n\n## Storage\nSubmodules of this module are responsible for integrating with the various storages.\n\n### storage:db-core\nThis module shows an example of connecting to `MySql` using `Spring-Data-JPA`.\n\n<br/>\n\n## Support\nSubmodules of this module are responsible for additional support.\n\n### support:logging\nThis module supports logging of service and has a dependency added for distributed tracing support.\n\nIt also includes dependencies to support `Sentry`.\n\n### support:monitoring\nThis module supports monitoring of services.\n\n<br/>\n\n## Tests\nSubmodules of this module are responsible for the convenience of writing test codes.\n\n### tests:api-docs\nThis module is for writing spring-rest-docs conveniently.\n\n<br/>\n\n# Dependency Management\nAll dependency versioning is done through `gradle.properties` file.\n\nIf you want to add a new dependency, put the version in `gradle.properties` and load it in `build.gradle`.\n\n<br/>\n\n# Runtime Profiles\n\n## local\nThis profile aims to configure an environment that can be developed even if the network is disconnected.\n\n## local-dev\nThis profile aims configurations that allow me to connect to the DEV environment from my local machine.\n\n## dev\nThis profile exists for deploying Development environments.\n\n## staging\nThis profile exists for deploying Staging environments.\n\n## live\nThis profile exists for deploying Live environments.\n\n<br/>\n\n# Test Tasks & Tags\n\n## test\nThis is a collection of test-tasks that we want to run on `CI`.\n\nIf you want to change the settings, modify the `build.gradle` file.\n\n## unitTest\nThis is a group of tests that typically have no dependencies, are fast to run, and test a single feature.\n\n## contextTest\nThis is a task that runs with SpringContext and has integration tests.\n\n## restDocsTest\nThis is a task to create asciidoc based on spring-rest-docs.\n\n## developTest\nThis is a task of tests that should not be run in `CI`.\n\nThis is a good tag to use if you're not good at writing tests.\n\n<br/>\n\n# Recommended Preferences\n\n## Git Hook\nThis setting makes run `lint` on every commit.\n\n```\n$ git config core.hookspath .githooks\n```\n\n## IntelliJ IDEA\nThis setting makes it easier to run the `test code` out of the box.\n\n```\n// Gradle Build and run with IntelliJ IDEA\nBuild, Execution, Deployment > Build Tools > Gradle > Run tests using > IntelliJ IDEA\t\n```\n\nIf you want to apply lint settings to the format of IDEA, please refer to the guide below.\n\n[Spring Java Format IntelliJ IDEA](https://github.com/spring-io/spring-javaformat#intellij-idea)\n\n---\n\n# Supported By\n<div align=\"center\"><a href=\"https://jb.gg/OpenSourceSupport\"><img src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" alt=\"JetBrains Logo (Main) logo.\" width=\"240\"></a></div>\n"
  },
  {
    "path": "build.gradle",
    "content": "plugins {\n    id 'java-library'\n    id 'org.springframework.boot' apply(false)\n    id 'io.spring.dependency-management'\n    id 'io.spring.javaformat' apply(false)\n    id 'org.asciidoctor.jvm.convert' apply(false)\n}\n\napply from: 'lint.gradle'\n\nallprojects {\n    group = \"${projectGroup}\"\n    version = \"${applicationVersion}\"\n\n    repositories {\n        mavenCentral()\n    }\n}\n\nsubprojects {\n    apply plugin: 'java-library'\n    apply plugin: 'org.springframework.boot'\n    apply plugin: 'io.spring.dependency-management'\n    apply plugin: 'org.asciidoctor.jvm.convert'\n    \n    dependencyManagement {\n        imports {\n            mavenBom \"org.springframework.cloud:spring-cloud-dependencies:${springCloudDependenciesVersion}\"\n        }\n    }\n\n    dependencies {\n        annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'\n        testImplementation 'org.springframework.boot:spring-boot-test'\n        testImplementation 'org.junit.jupiter:junit-jupiter-api'\n        testImplementation 'org.junit.jupiter:junit-jupiter-engine'\n        testRuntimeOnly 'org.junit.platform:junit-platform-launcher'\n        testImplementation 'org.assertj:assertj-core'\n        testImplementation 'org.mockito:mockito-core'\n    }\n\n    java {\n        toolchain {\n            languageVersion = JavaLanguageVersion.of(project.javaVersion)\n        }\n    }\n\n    bootJar.enabled = false\n    jar.enabled = true\n\n    test {\n        useJUnitPlatform {\n            excludeTags 'develop', 'restdocs'\n        }\n    }\n\n    testing {\n        suites {\n            test {\n                targets {\n                    unitTest {\n                        testTask.configure {\n                            group = 'verification'\n                            useJUnitPlatform {\n                                excludeTags 'develop', 'context', 'restdocs'\n                            }\n                        }\n                    }\n\n                    contextTest {\n                        testTask.configure {\n                            group = 'verification'\n                            useJUnitPlatform {\n                                includeTags 'context'\n                            }\n                        }\n                    }\n\n                    restDocsTest {\n                        testTask.configure {\n                            group = 'verification'\n                            useJUnitPlatform {\n                                includeTags 'restdocs'\n                            }\n                        }\n                    }\n\n                    developTest {\n                        testTask.configure {\n                            group = 'verification'\n                            useJUnitPlatform {\n                                includeTags 'develop'\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    tasks.named('asciidoctor').configure {\n        dependsOn restDocsTest\n    }\n}"
  },
  {
    "path": "clients/client-example/build.gradle",
    "content": "dependencies {\n    implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'\n    implementation 'io.github.openfeign:feign-hc5'\n    implementation 'io.github.openfeign:feign-micrometer'\n\n    testImplementation 'com.fasterxml.jackson.core:jackson-databind'\n}\n"
  },
  {
    "path": "clients/client-example/src/main/java/io/dodn/springboot/client/example/ExampleApi.java",
    "content": "package io.dodn.springboot.client.example;\n\nimport org.springframework.cloud.openfeign.FeignClient;\nimport org.springframework.http.MediaType;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\n\n@FeignClient(value = \"example-api\", url = \"${example.api.url}\")\ninterface ExampleApi {\n\n    @RequestMapping(method = RequestMethod.POST, value = \"/example/example-api\",\n            consumes = MediaType.APPLICATION_JSON_VALUE)\n    ExampleResponseDto example(@RequestBody ExampleRequestDto request);\n\n}\n"
  },
  {
    "path": "clients/client-example/src/main/java/io/dodn/springboot/client/example/ExampleClient.java",
    "content": "package io.dodn.springboot.client.example;\n\nimport io.dodn.springboot.client.example.model.ExampleClientResult;\n\nimport org.springframework.stereotype.Component;\n\n@Component\npublic class ExampleClient {\n\n    private final ExampleApi exampleApi;\n\n    public ExampleClient(ExampleApi exampleApi) {\n        this.exampleApi = exampleApi;\n    }\n\n    public ExampleClientResult example(String exampleParameter) {\n        ExampleRequestDto request = new ExampleRequestDto(exampleParameter);\n        return exampleApi.example(request).toResult();\n    }\n\n}\n"
  },
  {
    "path": "clients/client-example/src/main/java/io/dodn/springboot/client/example/ExampleConfig.java",
    "content": "package io.dodn.springboot.client.example;\n\nimport org.springframework.cloud.openfeign.EnableFeignClients;\nimport org.springframework.context.annotation.Configuration;\n\n@EnableFeignClients\n@Configuration\nclass ExampleConfig {\n\n}\n"
  },
  {
    "path": "clients/client-example/src/main/java/io/dodn/springboot/client/example/ExampleRequestDto.java",
    "content": "package io.dodn.springboot.client.example;\n\nrecord ExampleRequestDto(String exampleRequestValue) {\n}\n"
  },
  {
    "path": "clients/client-example/src/main/java/io/dodn/springboot/client/example/ExampleResponseDto.java",
    "content": "package io.dodn.springboot.client.example;\n\nimport io.dodn.springboot.client.example.model.ExampleClientResult;\n\nrecord ExampleResponseDto(String exampleResponseValue) {\n    ExampleClientResult toResult() {\n        return new ExampleClientResult(exampleResponseValue);\n    }\n}\n"
  },
  {
    "path": "clients/client-example/src/main/java/io/dodn/springboot/client/example/model/ExampleClientResult.java",
    "content": "package io.dodn.springboot.client.example.model;\n\npublic record ExampleClientResult(String exampleResult) {\n}\n"
  },
  {
    "path": "clients/client-example/src/main/resources/client-example.yml",
    "content": "example:\n  api:\n    url: https://default.example.example\n    exampleValue: exampleDefaultValue\n\nspring.cloud.openfeign:\n  client:\n    config:\n      example-api:\n        connectTimeout: 2100\n        readTimeout: 5000\n        loggerLevel: full\n  compression:\n    response:\n      enabled: false\n  httpclient:\n    max-connections: 2000\n    max-connections-per-route: 500\n\n---\nspring.config.activate.on-profile: local\n\n---\nspring.config.activate.on-profile:\n  - local-dev\n  - dev\n\n---\nspring.config.activate.on-profile:\n  - staging\n  - live\n\nexample:\n  api:\n    url: https://live.example.example\n    exampleValue: exampleLiveValue\n\n"
  },
  {
    "path": "clients/client-example/src/test/java/io/dodn/springboot/client/ClientExampleContextTest.java",
    "content": "package io.dodn.springboot.client;\n\nimport org.junit.jupiter.api.Tag;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.context.ActiveProfiles;\nimport org.springframework.test.context.TestConstructor;\n\n@ActiveProfiles(\"local\")\n@Tag(\"context\")\n@SpringBootTest\n@TestConstructor(autowireMode = TestConstructor.AutowireMode.ALL)\npublic abstract class ClientExampleContextTest {\n\n}\n"
  },
  {
    "path": "clients/client-example/src/test/java/io/dodn/springboot/client/ClientExampleTestApplication.java",
    "content": "package io.dodn.springboot.client;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.boot.context.properties.ConfigurationPropertiesScan;\n\n@ConfigurationPropertiesScan\n@SpringBootApplication\npublic class ClientExampleTestApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(ClientExampleTestApplication.class, args);\n    }\n\n}\n"
  },
  {
    "path": "clients/client-example/src/test/java/io/dodn/springboot/client/example/ExampleClientTest.java",
    "content": "package io.dodn.springboot.client.example;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport feign.RetryableException;\n\nimport io.dodn.springboot.client.ClientExampleContextTest;\n\nimport org.junit.jupiter.api.Test;\n\npublic class ExampleClientTest extends ClientExampleContextTest {\n\n    private final ExampleClient exampleClient;\n\n    public ExampleClientTest(ExampleClient exampleClient) {\n        this.exampleClient = exampleClient;\n    }\n\n    @Test\n    public void shouldBeThrownExceptionWhenExample() {\n        try {\n            exampleClient.example(\"HELLO!\");\n        }\n        catch (Exception e) {\n            assertThat(e).isExactlyInstanceOf(RetryableException.class);\n        }\n    }\n\n}\n"
  },
  {
    "path": "clients/client-example/src/test/resources/application.yml",
    "content": "spring.application.name: client-example-test\n\nspring:\n  config:\n    import:\n      - client-example.yml\n"
  },
  {
    "path": "core/core-api/build.gradle",
    "content": "bootJar.enabled = true\njar.enabled = false\n\ndependencies {\n    implementation project(\":core:core-enum\")\n    implementation project(\":support:monitoring\")\n    implementation project(\":support:logging\")\n    implementation project(\":storage:db-core\")\n    implementation project(\":clients:client-example\")\n\n    testImplementation project(\":tests:api-docs\")\n    \n    implementation 'org.springframework.boot:spring-boot-starter-webmvc'\n}"
  },
  {
    "path": "core/core-api/src/docs/asciidoc/index.adoc",
    "content": "= API Docs\n:doctype: book\n:icons: font\n:source-highlighter: highlightjs\n:toc: left\n:toclevels: 3\n:sectlinks:\n:snippets: build/generated-snippets\n\n== Introduce\n\nThis is the Core API documentation.\n\n== Example API\n\n=== Example GET API\n==== Curl Request\ninclude::{snippets}/exampleGet/curl-request.adoc[]\n==== Path Parameters\ninclude::{snippets}/exampleGet/path-parameters.adoc[]\n==== Query Parameters\ninclude::{snippets}/exampleGet/query-parameters.adoc[]\n==== Http Response\ninclude::{snippets}/exampleGet/http-response.adoc[]\n==== Response Fields\ninclude::{snippets}/exampleGet/response-fields.adoc[]\n\n'''\n\n=== Example POST API\n==== Curl Request\ninclude::{snippets}/examplePost/curl-request.adoc[]\n==== Request Fields\ninclude::{snippets}/examplePost/request-fields.adoc[]\n==== Http Response\ninclude::{snippets}/examplePost/http-response.adoc[]\n==== Response Fields\ninclude::{snippets}/examplePost/response-fields.adoc[]\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/CoreApiApplication.java",
    "content": "package io.dodn.springboot;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.boot.context.properties.ConfigurationPropertiesScan;\n\n@ConfigurationPropertiesScan\n@SpringBootApplication\npublic class CoreApiApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(CoreApiApplication.class, args);\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/config/AsyncConfig.java",
    "content": "package io.dodn.springboot.core.api.config;\n\nimport org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.scheduling.annotation.AsyncConfigurer;\nimport org.springframework.scheduling.annotation.EnableAsync;\nimport org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;\n\nimport java.util.concurrent.Executor;\n\n@Configuration\n@EnableAsync\npublic class AsyncConfig implements AsyncConfigurer {\n\n    @Bean\n    @Override\n    public Executor getAsyncExecutor() {\n        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();\n        executor.setCorePoolSize(10);\n        executor.setMaxPoolSize(10);\n        executor.setQueueCapacity(10000);\n        executor.setWaitForTasksToCompleteOnShutdown(true);\n        executor.setAwaitTerminationSeconds(10);\n        return executor;\n    }\n\n    @Override\n    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {\n        return new AsyncExceptionHandler();\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/config/AsyncExceptionHandler.java",
    "content": "package io.dodn.springboot.core.api.config;\n\nimport io.dodn.springboot.core.support.error.CoreException;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;\n\nimport java.lang.reflect.Method;\n\npublic class AsyncExceptionHandler implements AsyncUncaughtExceptionHandler {\n\n    private final Logger log = LoggerFactory.getLogger(getClass());\n\n    @Override\n    public void handleUncaughtException(Throwable e, Method method, Object... params) {\n        if (e instanceof CoreException) {\n            switch (((CoreException) e).getErrorType().getLogLevel()) {\n                case ERROR -> log.error(\"CoreException : {}\", e.getMessage(), e);\n                case WARN -> log.warn(\"CoreException : {}\", e.getMessage(), e);\n                default -> log.info(\"CoreException : {}\", e.getMessage(), e);\n            }\n        }\n        else {\n            log.error(\"Exception : {}\", e.getMessage(), e);\n        }\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/controller/ApiControllerAdvice.java",
    "content": "package io.dodn.springboot.core.api.controller;\n\nimport io.dodn.springboot.core.support.error.CoreException;\nimport io.dodn.springboot.core.support.error.ErrorType;\nimport io.dodn.springboot.core.support.response.ApiResponse;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.ExceptionHandler;\nimport org.springframework.web.bind.annotation.RestControllerAdvice;\n\n@RestControllerAdvice\npublic class ApiControllerAdvice {\n\n    private final Logger log = LoggerFactory.getLogger(getClass());\n\n    @ExceptionHandler(CoreException.class)\n    public ResponseEntity<ApiResponse<?>> handleCoreException(CoreException e) {\n        switch (e.getErrorType().getLogLevel()) {\n            case ERROR -> log.error(\"CoreException : {}\", e.getMessage(), e);\n            case WARN -> log.warn(\"CoreException : {}\", e.getMessage(), e);\n            default -> log.info(\"CoreException : {}\", e.getMessage(), e);\n        }\n        return new ResponseEntity<>(ApiResponse.error(e.getErrorType(), e.getData()), e.getErrorType().getStatus());\n    }\n\n    @ExceptionHandler(Exception.class)\n    public ResponseEntity<ApiResponse<?>> handleException(Exception e) {\n        log.error(\"Exception : {}\", e.getMessage(), e);\n        return new ResponseEntity<>(ApiResponse.error(ErrorType.DEFAULT_ERROR), ErrorType.DEFAULT_ERROR.getStatus());\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/controller/HealthController.java",
    "content": "package io.dodn.springboot.core.api.controller;\n\nimport org.springframework.http.HttpStatus;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\npublic class HealthController {\n\n    @GetMapping(\"/health\")\n    public ResponseEntity<Object> health() {\n        return ResponseEntity.status(HttpStatus.OK).build();\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/controller/v1/ExampleController.java",
    "content": "package io.dodn.springboot.core.api.controller.v1;\n\nimport io.dodn.springboot.core.api.controller.v1.request.ExampleRequestDto;\nimport io.dodn.springboot.core.api.controller.v1.response.ExampleItemResponseDto;\nimport io.dodn.springboot.core.api.controller.v1.response.ExampleResponseDto;\nimport io.dodn.springboot.core.domain.ExampleData;\nimport io.dodn.springboot.core.domain.ExampleResult;\nimport io.dodn.springboot.core.domain.ExampleService;\nimport io.dodn.springboot.core.support.response.ApiResponse;\n\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.RestController;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n\n@RestController\npublic class ExampleController {\n\n    private final ExampleService exampleExampleService;\n\n    public ExampleController(ExampleService exampleExampleService) {\n        this.exampleExampleService = exampleExampleService;\n    }\n\n    @GetMapping(\"/get/{exampleValue}\")\n    public ApiResponse<ExampleResponseDto> exampleGet(@PathVariable String exampleValue,\n            @RequestParam String exampleParam) {\n        ExampleResult result = exampleExampleService.processExample(new ExampleData(exampleValue, exampleParam));\n        return ApiResponse.success(new ExampleResponseDto(result.data(), LocalDate.now(), LocalDateTime.now(),\n                ExampleItemResponseDto.build()));\n    }\n\n    @PostMapping(\"/post\")\n    public ApiResponse<ExampleResponseDto> examplePost(@RequestBody ExampleRequestDto request) {\n        ExampleResult result = exampleExampleService.processExample(request.toExampleData());\n        return ApiResponse.success(new ExampleResponseDto(result.data(), LocalDate.now(), LocalDateTime.now(),\n                ExampleItemResponseDto.build()));\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/controller/v1/request/ExampleRequestDto.java",
    "content": "package io.dodn.springboot.core.api.controller.v1.request;\n\nimport io.dodn.springboot.core.domain.ExampleData;\n\npublic record ExampleRequestDto(String data) {\n    public ExampleData toExampleData() {\n        return new ExampleData(data, data);\n    }\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/controller/v1/response/ExampleItemResponseDto.java",
    "content": "package io.dodn.springboot.core.api.controller.v1.response;\n\nimport java.util.List;\n\npublic record ExampleItemResponseDto(String key) {\n    public static List<ExampleItemResponseDto> build() {\n        return List.of(new ExampleItemResponseDto(\"1\"), new ExampleItemResponseDto(\"2\"));\n    }\n}"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/api/controller/v1/response/ExampleResponseDto.java",
    "content": "package io.dodn.springboot.core.api.controller.v1.response;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.util.List;\n\npublic record ExampleResponseDto(String result, LocalDate date, LocalDateTime datetime,\n        List<ExampleItemResponseDto> items) {\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/domain/ExampleData.java",
    "content": "package io.dodn.springboot.core.domain;\n\npublic record ExampleData(String value, String param) {\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/domain/ExampleResult.java",
    "content": "package io.dodn.springboot.core.domain;\n\npublic record ExampleResult(String data) {\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/domain/ExampleService.java",
    "content": "package io.dodn.springboot.core.domain;\n\nimport org.springframework.stereotype.Service;\n\n@Service\npublic class ExampleService {\n\n    public ExampleResult processExample(ExampleData exampleData) {\n        return new ExampleResult(exampleData.value());\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/support/error/CoreException.java",
    "content": "package io.dodn.springboot.core.support.error;\n\npublic class CoreException extends RuntimeException {\n\n    private final ErrorType errorType;\n\n    private final Object data;\n\n    public CoreException(ErrorType errorType) {\n        super(errorType.getMessage());\n        this.errorType = errorType;\n        this.data = null;\n    }\n\n    public CoreException(ErrorType errorType, Object data) {\n        super(errorType.getMessage());\n        this.errorType = errorType;\n        this.data = data;\n    }\n\n    public ErrorType getErrorType() {\n        return errorType;\n    }\n\n    public Object getData() {\n        return data;\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/support/error/ErrorCode.java",
    "content": "package io.dodn.springboot.core.support.error;\n\npublic enum ErrorCode {\n\n    E500\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/support/error/ErrorMessage.java",
    "content": "package io.dodn.springboot.core.support.error;\n\npublic class ErrorMessage {\n\n    private final String code;\n\n    private final String message;\n\n    private final Object data;\n\n    public ErrorMessage(ErrorType errorType) {\n        this.code = errorType.getCode().name();\n        this.message = errorType.getMessage();\n        this.data = null;\n    }\n\n    public ErrorMessage(ErrorType errorType, Object data) {\n        this.code = errorType.getCode().name();\n        this.message = errorType.getMessage();\n        this.data = data;\n    }\n\n    public String getCode() {\n        return code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public Object getData() {\n        return data;\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/support/error/ErrorType.java",
    "content": "package io.dodn.springboot.core.support.error;\n\nimport org.springframework.boot.logging.LogLevel;\nimport org.springframework.http.HttpStatus;\n\npublic enum ErrorType {\n\n    DEFAULT_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, ErrorCode.E500, \"An unexpected error has occurred.\",\n            LogLevel.ERROR);\n\n    private final HttpStatus status;\n\n    private final ErrorCode code;\n\n    private final String message;\n\n    private final LogLevel logLevel;\n\n    ErrorType(HttpStatus status, ErrorCode code, String message, LogLevel logLevel) {\n\n        this.status = status;\n        this.code = code;\n        this.message = message;\n        this.logLevel = logLevel;\n    }\n\n    public HttpStatus getStatus() {\n        return status;\n    }\n\n    public ErrorCode getCode() {\n        return code;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n    public LogLevel getLogLevel() {\n        return logLevel;\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/support/response/ApiResponse.java",
    "content": "package io.dodn.springboot.core.support.response;\n\nimport io.dodn.springboot.core.support.error.ErrorMessage;\nimport io.dodn.springboot.core.support.error.ErrorType;\n\npublic class ApiResponse<S> {\n\n    private final ResultType result;\n\n    private final S data;\n\n    private final ErrorMessage error;\n\n    private ApiResponse(ResultType result, S data, ErrorMessage error) {\n        this.result = result;\n        this.data = data;\n        this.error = error;\n    }\n\n    public static ApiResponse<?> success() {\n        return new ApiResponse<>(ResultType.SUCCESS, null, null);\n    }\n\n    public static <S> ApiResponse<S> success(S data) {\n        return new ApiResponse<>(ResultType.SUCCESS, data, null);\n    }\n\n    public static ApiResponse<?> error(ErrorType error) {\n        return new ApiResponse<>(ResultType.ERROR, null, new ErrorMessage(error));\n    }\n\n    public static ApiResponse<?> error(ErrorType error, Object errorData) {\n        return new ApiResponse<>(ResultType.ERROR, null, new ErrorMessage(error, errorData));\n    }\n\n    public ResultType getResult() {\n        return result;\n    }\n\n    public Object getData() {\n        return data;\n    }\n\n    public ErrorMessage getError() {\n        return error;\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/java/io/dodn/springboot/core/support/response/ResultType.java",
    "content": "package io.dodn.springboot.core.support.response;\n\npublic enum ResultType {\n\n    SUCCESS, ERROR\n\n}\n"
  },
  {
    "path": "core/core-api/src/main/resources/application.yml",
    "content": "spring.application.name: core-api\nspring.profiles.active: local\n\nspring:\n  config:\n    import:\n      - monitoring.yml\n      - logging.yml\n      - db-core.yml\n      - client-example.yml\n  web.resources.add-mappings: false\n\nserver:\n  tomcat:\n    max-connections: 20000\n    threads:\n      max: 600\n      min-spare: 100\n\n---\nspring.config.activate.on-profile: local\n\n\n---\nspring.config.activate.on-profile: local-dev\n\n\n---\nspring.config.activate.on-profile: dev\n\n\n---\nspring.config.activate.on-profile: staging\n\n\n---\nspring.config.activate.on-profile: live\n\n"
  },
  {
    "path": "core/core-api/src/test/java/io/dodn/springboot/ContextTest.java",
    "content": "package io.dodn.springboot;\n\nimport org.junit.jupiter.api.Tag;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.context.TestConstructor;\n\n@Tag(\"context\")\n@SpringBootTest\n@TestConstructor(autowireMode = TestConstructor.AutowireMode.ALL)\npublic abstract class ContextTest {\n\n}\n"
  },
  {
    "path": "core/core-api/src/test/java/io/dodn/springboot/CoreApiApplicationTest.java",
    "content": "package io.dodn.springboot;\n\nimport org.junit.jupiter.api.Test;\n\npublic class CoreApiApplicationTest extends ContextTest {\n\n    @Test\n    public void shouldBeLoadedContext() {\n        // it should be passed\n    }\n\n}\n"
  },
  {
    "path": "core/core-api/src/test/java/io/dodn/springboot/DevelopTest.java",
    "content": "package io.dodn.springboot;\n\nimport org.junit.jupiter.api.Tag;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.context.TestConstructor;\n\n@Tag(\"develop\")\n@SpringBootTest\n@TestConstructor(autowireMode = TestConstructor.AutowireMode.ALL)\npublic abstract class DevelopTest {\n\n}\n"
  },
  {
    "path": "core/core-api/src/test/java/io/dodn/springboot/core/api/controller/v1/ExampleControllerTest.java",
    "content": "package io.dodn.springboot.core.api.controller.v1;\n\nimport io.dodn.springboot.core.api.controller.v1.request.ExampleRequestDto;\nimport io.dodn.springboot.core.domain.ExampleResult;\nimport io.dodn.springboot.core.domain.ExampleService;\nimport io.dodn.springboot.test.api.RestDocsTest;\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Test;\nimport org.springframework.http.MediaType;\nimport org.springframework.restdocs.operation.preprocess.Preprocessors;\nimport org.springframework.restdocs.payload.JsonFieldType;\nimport tools.jackson.databind.json.JsonMapper;\n\nimport static org.mockito.ArgumentMatchers.any;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.when;\nimport static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;\nimport static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.get;\nimport static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.post;\nimport static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath;\nimport static org.springframework.restdocs.payload.PayloadDocumentation.requestFields;\nimport static org.springframework.restdocs.payload.PayloadDocumentation.responseFields;\nimport static org.springframework.restdocs.request.RequestDocumentation.parameterWithName;\nimport static org.springframework.restdocs.request.RequestDocumentation.pathParameters;\nimport static org.springframework.restdocs.request.RequestDocumentation.queryParameters;\nimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;\n\npublic class ExampleControllerTest extends RestDocsTest {\n\n    private ExampleService exampleService;\n\n    @BeforeEach\n    public void setUp() {\n        exampleService = mock(ExampleService.class);\n        mockMvc = mockController(new ExampleController(exampleService));\n    }\n\n    @Test\n    public void exampleGet() throws Exception {\n        when(exampleService.processExample(any())).thenReturn(new ExampleResult(\"BYE\"));\n\n        mockMvc\n            .perform(get(\"/get/{exampleValue}\", \"HELLO_PATH\").param(\"exampleParam\", \"HELLO_PARAM\")\n                .contentType(MediaType.APPLICATION_JSON))\n            .andExpect(status().isOk())\n            .andDo(document(\"exampleGet\", Preprocessors.preprocessRequest(Preprocessors.prettyPrint()),\n                    Preprocessors.preprocessResponse(Preprocessors.prettyPrint()),\n                    pathParameters(parameterWithName(\"exampleValue\").description(\"ExampleValue\")),\n                    queryParameters(parameterWithName(\"exampleParam\").description(\"ExampleParam\")),\n                    responseFields(fieldWithPath(\"result\").type(JsonFieldType.STRING).description(\"ResultType\"),\n                            fieldWithPath(\"data.result\").type(JsonFieldType.STRING).description(\"Result Data\"),\n                            fieldWithPath(\"data.date\").type(JsonFieldType.STRING).description(\"Result Date\"),\n                            fieldWithPath(\"data.datetime\").type(JsonFieldType.STRING).description(\"Result Datetime\"),\n                            fieldWithPath(\"data.items\").type(JsonFieldType.ARRAY).description(\"Result Items\"),\n                            fieldWithPath(\"data.items[].key\").type(JsonFieldType.STRING).description(\"Result Item\"),\n                            fieldWithPath(\"error\").type(JsonFieldType.NULL).ignored())));\n    }\n\n    @Test\n    public void examplePost() throws Exception {\n        when(exampleService.processExample(any())).thenReturn(new ExampleResult(\"BYE\"));\n\n        mockMvc\n            .perform(post(\"/post\").contentType(MediaType.APPLICATION_JSON)\n                .content(JsonMapper.builder().build().writeValueAsString(new ExampleRequestDto(\"HELLO_BODY\"))))\n            .andExpect(status().isOk())\n            .andDo(document(\"examplePost\", Preprocessors.preprocessRequest(Preprocessors.prettyPrint()),\n                    Preprocessors.preprocessResponse(Preprocessors.prettyPrint()),\n                    requestFields(\n                            fieldWithPath(\"data\").type(JsonFieldType.STRING).description(\"ExampleBody Data Field\")),\n                    responseFields(fieldWithPath(\"result\").type(JsonFieldType.STRING).description(\"ResultType\"),\n                            fieldWithPath(\"data.result\").type(JsonFieldType.STRING).description(\"Result Data\"),\n                            fieldWithPath(\"data.date\").type(JsonFieldType.STRING).description(\"Result Date\"),\n                            fieldWithPath(\"data.datetime\").type(JsonFieldType.STRING).description(\"Result Datetime\"),\n                            fieldWithPath(\"data.items\").type(JsonFieldType.ARRAY).description(\"Result Items\"),\n                            fieldWithPath(\"data.items[].key\").type(JsonFieldType.STRING).description(\"Result Item\"),\n                            fieldWithPath(\"error\").type(JsonFieldType.STRING).ignored())));\n    }\n\n}\n"
  },
  {
    "path": "core/core-enum/build.gradle",
    "content": ""
  },
  {
    "path": "core/core-enum/src/main/java/io/dodn/springboot/core/enums/ExampleEnum.java",
    "content": "package io.dodn.springboot.core.enums;\n\npublic enum ExampleEnum {\n\n}\n"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "content": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-9.2.1-bin.zip\nnetworkTimeout=10000\nvalidateDistributionUrl=true\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "gradle.properties",
    "content": "### Application version ###\napplicationVersion=0.0.1-SNAPSHOT\n\n### Project configs ###\nprojectGroup=io.dodn.springboot\njavaVersion=25\n\n### Plugin dependency versions ###\nasciidoctorConvertVersion=4.0.5\nspringJavaFormatVersion=0.0.47\n\n### Spring dependency versions ###\nspringBootVersion=4.0.0\nspringDependencyManagementVersion=1.1.7\nspringCloudDependenciesVersion=2025.1.0\n\n### External dependency versions ###\nsentryVersion=8.27.1\n"
  },
  {
    "path": "gradlew",
    "content": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# SPDX-License-Identifier: Apache-2.0\n#\n\n##############################################################################\n#\n#   Gradle start up script for POSIX generated by Gradle.\n#\n#   Important for running:\n#\n#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is\n#       noncompliant, but you have some other compliant shell such as ksh or\n#       bash, then to run this script, type that shell name before the whole\n#       command line, like:\n#\n#           ksh Gradle\n#\n#       Busybox and similar reduced shells will NOT work, because this script\n#       requires all of these POSIX shell features:\n#         * functions;\n#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,\n#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;\n#         * compound commands having a testable exit status, especially «case»;\n#         * various built-in commands including «command», «set», and «ulimit».\n#\n#   Important for patching:\n#\n#   (2) This script targets any POSIX shell, so it avoids extensions provided\n#       by Bash, Ksh, etc; in particular arrays are avoided.\n#\n#       The \"traditional\" practice of packing multiple parameters into a\n#       space-separated string is a well documented source of bugs and security\n#       problems, so this is (mostly) avoided, by progressively accumulating\n#       options in \"$@\", and eventually passing that to Java.\n#\n#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,\n#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;\n#       see the in-line comments for details.\n#\n#       There are tweaks for specific operating systems such as AIX, CygWin,\n#       Darwin, MinGW, and NonStop.\n#\n#   (3) This script is generated from the Groovy template\n#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt\n#       within the Gradle project.\n#\n#       You can find Gradle at https://github.com/gradle/gradle/.\n#\n##############################################################################\n\n# Attempt to set APP_HOME\n\n# Resolve links: $0 may be a link\napp_path=$0\n\n# Need this for daisy-chained symlinks.\nwhile\n    APP_HOME=${app_path%\"${app_path##*/}\"}  # leaves a trailing /; empty if no leading path\n    [ -h \"$app_path\" ]\ndo\n    ls=$( ls -ld \"$app_path\" )\n    link=${ls#*' -> '}\n    case $link in             #(\n      /*)   app_path=$link ;; #(\n      *)    app_path=$APP_HOME$link ;;\n    esac\ndone\n\n# This is normally unused\n# shellcheck disable=SC2034\nAPP_BASE_NAME=${0##*/}\n# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)\nAPP_HOME=$( cd -P \"${APP_HOME:-./}\" > /dev/null && printf '%s\\n' \"$PWD\" ) || exit\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=maximum\n\nwarn () {\n    echo \"$*\"\n} >&2\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n} >&2\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"$( uname )\" in                #(\n  CYGWIN* )         cygwin=true  ;; #(\n  Darwin* )         darwin=true  ;; #(\n  MSYS* | MINGW* )  msys=true    ;; #(\n  NONSTOP* )        nonstop=true ;;\nesac\n\nCLASSPATH=\"\\\\\\\"\\\\\\\"\"\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=$JAVA_HOME/jre/sh/java\n    else\n        JAVACMD=$JAVA_HOME/bin/java\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=java\n    if ! command -v java >/dev/null 2>&1\n    then\n        die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nfi\n\n# Increase the maximum file descriptors if we can.\nif ! \"$cygwin\" && ! \"$darwin\" && ! \"$nonstop\" ; then\n    case $MAX_FD in #(\n      max*)\n        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        MAX_FD=$( ulimit -H -n ) ||\n            warn \"Could not query maximum file descriptor limit\"\n    esac\n    case $MAX_FD in  #(\n      '' | soft) :;; #(\n      *)\n        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.\n        # shellcheck disable=SC2039,SC3045\n        ulimit -n \"$MAX_FD\" ||\n            warn \"Could not set maximum file descriptor limit to $MAX_FD\"\n    esac\nfi\n\n# Collect all arguments for the java command, stacking in reverse order:\n#   * args from the command line\n#   * the main class name\n#   * -classpath\n#   * -D...appname settings\n#   * --module-path (only if needed)\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif \"$cygwin\" || \"$msys\" ; then\n    APP_HOME=$( cygpath --path --mixed \"$APP_HOME\" )\n    CLASSPATH=$( cygpath --path --mixed \"$CLASSPATH\" )\n\n    JAVACMD=$( cygpath --unix \"$JAVACMD\" )\n\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    for arg do\n        if\n            case $arg in                                #(\n              -*)   false ;;                            # don't mess with options #(\n              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath\n                    [ -e \"$t\" ] ;;                      #(\n              *)    false ;;\n            esac\n        then\n            arg=$( cygpath --path --ignore --mixed \"$arg\" )\n        fi\n        # Roll the args list around exactly as many times as the number of\n        # args, so each arg winds up back in the position where it started, but\n        # possibly modified.\n        #\n        # NB: a `for` loop captures its iteration list before it begins, so\n        # changing the positional parameters here affects neither the number of\n        # iterations, nor the values presented in `arg`.\n        shift                   # remove old arg\n        set -- \"$@\" \"$arg\"      # push replacement arg\n    done\nfi\n\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Collect all arguments for the java command:\n#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,\n#     and any embedded shellness will be escaped.\n#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be\n#     treated as '${Hostname}' itself on the command line.\n\nset -- \\\n        \"-Dorg.gradle.appname=$APP_BASE_NAME\" \\\n        -classpath \"$CLASSPATH\" \\\n        -jar \"$APP_HOME/gradle/wrapper/gradle-wrapper.jar\" \\\n        \"$@\"\n\n# Stop when \"xargs\" is not available.\nif ! command -v xargs >/dev/null 2>&1\nthen\n    die \"xargs is not available\"\nfi\n\n# Use \"xargs\" to parse quoted args.\n#\n# With -n1 it outputs one arg per line, with the quotes and backslashes removed.\n#\n# In Bash we could simply go:\n#\n#   readarray ARGS < <( xargs -n1 <<<\"$var\" ) &&\n#   set -- \"${ARGS[@]}\" \"$@\"\n#\n# but POSIX shell has neither arrays nor command substitution, so instead we\n# post-process each arg (as a line of input to sed) to backslash-escape any\n# character that might be a shell metacharacter, then use eval to reverse\n# that process (while maintaining the separation between arguments), and wrap\n# the whole thing up as a single \"set\" statement.\n#\n# This will of course break if any of these variables contains a newline or\n# an unmatched quote.\n#\n\neval \"set -- $(\n        printf '%s\\n' \"$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS\" |\n        xargs -n1 |\n        sed ' s~[^-[:alnum:]+,./:=@_]~\\\\&~g; ' |\n        tr '\\n' ' '\n    )\" '\"$@\"'\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "gradlew.bat",
    "content": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\r\n@rem you may not use this file except in compliance with the License.\r\n@rem You may obtain a copy of the License at\r\n@rem\r\n@rem      https://www.apache.org/licenses/LICENSE-2.0\r\n@rem\r\n@rem Unless required by applicable law or agreed to in writing, software\r\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\r\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n@rem See the License for the specific language governing permissions and\r\n@rem limitations under the License.\r\n@rem\r\n@rem SPDX-License-Identifier: Apache-2.0\r\n@rem\r\n\r\n@if \"%DEBUG%\"==\"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@rem  Gradle startup script for Windows\r\n@rem\r\n@rem ##########################################################################\r\n\r\n@rem Set local scope for the variables with windows NT shell\r\nif \"%OS%\"==\"Windows_NT\" setlocal\r\n\r\nset DIRNAME=%~dp0\r\nif \"%DIRNAME%\"==\"\" set DIRNAME=.\r\n@rem This is normally unused\r\nset APP_BASE_NAME=%~n0\r\nset APP_HOME=%DIRNAME%\r\n\r\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\r\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\r\n\r\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\r\n\r\n@rem Find java.exe\r\nif defined JAVA_HOME goto findJavaFromJavaHome\r\n\r\nset JAVA_EXE=java.exe\r\n%JAVA_EXE% -version >NUL 2>&1\r\nif %ERRORLEVEL% equ 0 goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:findJavaFromJavaHome\r\nset JAVA_HOME=%JAVA_HOME:\"=%\r\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\r\n\r\nif exist \"%JAVA_EXE%\" goto execute\r\n\r\necho. 1>&2\r\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2\r\necho. 1>&2\r\necho Please set the JAVA_HOME variable in your environment to match the 1>&2\r\necho location of your Java installation. 1>&2\r\n\r\ngoto fail\r\n\r\n:execute\r\n@rem Setup the command line\r\n\r\nset CLASSPATH=\r\n\r\n\r\n@rem Execute Gradle\r\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" -jar \"%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\" %*\r\n\r\n:end\r\n@rem End local scope for the variables with windows NT shell\r\nif %ERRORLEVEL% equ 0 goto mainEnd\r\n\r\n:fail\r\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r\nrem the _cmd.exe /c_ return code!\r\nset EXIT_CODE=%ERRORLEVEL%\r\nif %EXIT_CODE% equ 0 set EXIT_CODE=1\r\nif not \"\"==\"%GRADLE_EXIT_CONSOLE%\" exit %EXIT_CODE%\r\nexit /b %EXIT_CODE%\r\n\r\n:mainEnd\r\nif \"%OS%\"==\"Windows_NT\" endlocal\r\n\r\n:omega\r\n"
  },
  {
    "path": "lint.gradle",
    "content": "subprojects {\n    apply plugin: 'java'\n    apply plugin: 'io.spring.javaformat'\n\n    dependencies {\n        compileOnly \"io.spring.javaformat:spring-javaformat-gradle-plugin:${springJavaFormatVersion}\"\n    }\n}"
  },
  {
    "path": "settings.gradle",
    "content": "pluginManagement {\n    plugins {\n        id 'org.springframework.boot' version \"${springBootVersion}\"\n        id 'io.spring.dependency-management' version \"${springDependencyManagementVersion}\"\n        id 'org.asciidoctor.jvm.convert' version \"${asciidoctorConvertVersion}\"\n        id 'io.spring.javaformat' version \"${springJavaFormatVersion}\"\n    }\n}\n\nrootProject.name = 'spring-boot-java-template'\n\ninclude 'core:core-enum'\ninclude 'core:core-api'\ninclude 'storage:db-core'\ninclude 'tests:api-docs'\ninclude 'support:logging'\ninclude 'support:monitoring'\ninclude 'clients:client-example'"
  },
  {
    "path": "storage/db-core/build.gradle",
    "content": "dependencies {\n    implementation project(':core:core-enum')\n    api 'org.springframework.boot:spring-boot-starter-data-jpa'\n    runtimeOnly 'com.mysql:mysql-connector-j'\n    runtimeOnly 'com.h2database:h2'\n}\n"
  },
  {
    "path": "storage/db-core/src/main/java/io/dodn/springboot/storage/db/core/BaseEntity.java",
    "content": "package io.dodn.springboot.storage.db.core;\n\nimport jakarta.persistence.Column;\nimport jakarta.persistence.GeneratedValue;\nimport jakarta.persistence.GenerationType;\nimport jakarta.persistence.Id;\nimport jakarta.persistence.MappedSuperclass;\n\nimport org.hibernate.annotations.CreationTimestamp;\nimport org.hibernate.annotations.UpdateTimestamp;\n\nimport java.time.LocalDateTime;\n\n@MappedSuperclass\npublic abstract class BaseEntity {\n\n    @Id\n    @GeneratedValue(strategy = GenerationType.IDENTITY)\n    private Long id;\n\n    @CreationTimestamp\n    @Column\n    private LocalDateTime createdAt;\n\n    @UpdateTimestamp\n    @Column\n    private LocalDateTime updatedAt;\n\n    public Long getId() {\n        return id;\n    }\n\n    public LocalDateTime getCreatedAt() {\n        return createdAt;\n    }\n\n    public LocalDateTime getUpdatedAt() {\n        return updatedAt;\n    }\n\n}\n"
  },
  {
    "path": "storage/db-core/src/main/java/io/dodn/springboot/storage/db/core/ExampleEntity.java",
    "content": "package io.dodn.springboot.storage.db.core;\n\nimport jakarta.persistence.Column;\nimport jakarta.persistence.Entity;\n\n@Entity\npublic class ExampleEntity extends BaseEntity {\n\n    @Column\n    private String exampleColumn;\n\n    public ExampleEntity() {\n    }\n\n    public ExampleEntity(String exampleColumn) {\n        this.exampleColumn = exampleColumn;\n    }\n\n    public String getExampleColumn() {\n        return exampleColumn;\n    }\n\n}\n"
  },
  {
    "path": "storage/db-core/src/main/java/io/dodn/springboot/storage/db/core/ExampleRepository.java",
    "content": "package io.dodn.springboot.storage.db.core;\n\nimport org.springframework.data.jpa.repository.JpaRepository;\n\npublic interface ExampleRepository extends JpaRepository<ExampleEntity, Long> {\n\n}\n"
  },
  {
    "path": "storage/db-core/src/main/java/io/dodn/springboot/storage/db/core/config/CoreDataSourceConfig.java",
    "content": "package io.dodn.springboot.storage.db.core.config;\n\nimport com.zaxxer.hikari.HikariConfig;\nimport com.zaxxer.hikari.HikariDataSource;\n\nimport org.springframework.beans.factory.annotation.Qualifier;\nimport org.springframework.boot.context.properties.ConfigurationProperties;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\nclass CoreDataSourceConfig {\n\n    @Bean\n    @ConfigurationProperties(prefix = \"storage.datasource.core\")\n    public HikariConfig coreHikariConfig() {\n        return new HikariConfig();\n    }\n\n    @Bean\n    public HikariDataSource coreDataSource(@Qualifier(\"coreHikariConfig\") HikariConfig config) {\n        return new HikariDataSource(config);\n    }\n\n}\n"
  },
  {
    "path": "storage/db-core/src/main/java/io/dodn/springboot/storage/db/core/config/CoreJpaConfig.java",
    "content": "package io.dodn.springboot.storage.db.core.config;\n\nimport org.springframework.boot.persistence.autoconfigure.EntityScan;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.data.jpa.repository.config.EnableJpaRepositories;\nimport org.springframework.transaction.annotation.EnableTransactionManagement;\n\n@Configuration\n@EnableTransactionManagement\n@EntityScan(basePackages = \"io.dodn.springboot.storage.db.core\")\n@EnableJpaRepositories(basePackages = \"io.dodn.springboot.storage.db.core\")\nclass CoreJpaConfig {\n\n}\n"
  },
  {
    "path": "storage/db-core/src/main/resources/db-core.yml",
    "content": "spring:\n  jpa:\n    open-in-view: false\n    hibernate:\n      ddl-auto: validate\n    properties:\n      hibernate.default_batch_fetch_size: 100\n\n---\nspring.config.activate.on-profile: local\n\nspring:\n  jpa:\n    hibernate:\n      ddl-auto: create\n    properties:\n      hibernate:\n        format_sql: true\n        show_sql: true\n  h2:\n    console:\n      enabled: true\n\nstorage:\n  datasource:\n    core:\n      driver-class-name: org.h2.Driver\n      jdbc-url: jdbc:h2:mem:core;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE\n      username: sa\n      pool-name: core-db-pool\n      data-source-properties:\n        rewriteBatchedStatements: true\n\n---\nspring.config.activate.on-profile: local-dev\n\nspring:\n  jpa:\n    properties:\n      hibernate:\n        format_sql: true\n        show_sql: true\n\nstorage:\n  datasource:\n    core:\n      driver-class-name: com.mysql.cj.jdbc.Driver\n      jdbc-url: jdbc:mysql://${storage.database.core-db.url}\n      username: ${storage.database.core-db.username}\n      password: ${storage.database.core-db.password}\n      maximum-pool-size: 5\n      connection-timeout: 1100\n      keepalive-time: 30000\n      validation-timeout: 1000\n      max-lifetime: 600000\n      pool-name: core-db-pool\n      data-source-properties:\n        socketTimeout: 3000\n        cachePrepStmts: true\n        prepStmtCacheSize: 250\n        prepStmtCacheSqlLimit: 2048\n        useServerPrepStmts: true\n        useLocalSessionState: true\n        rewriteBatchedStatements: true\n        cacheResultSetMetadata: true\n        cacheServerConfiguration: true\n        elideSetAutoCommits: true\n        maintainTimeStats: false\n\n---\nspring.config.activate.on-profile: dev\n\nstorage:\n  datasource:\n    core:\n      driver-class-name: com.mysql.cj.jdbc.Driver\n      jdbc-url: jdbc:mysql://${storage.database.core-db.url}\n      username: ${storage.database.core-db.username}\n      password: ${storage.database.core-db.password}\n      maximum-pool-size: 5\n      connection-timeout: 1100\n      keepalive-time: 30000\n      validation-timeout: 1000\n      max-lifetime: 600000\n      pool-name: core-db-pool\n      data-source-properties:\n        socketTimeout: 3000\n        cachePrepStmts: true\n        prepStmtCacheSize: 250\n        prepStmtCacheSqlLimit: 2048\n        useServerPrepStmts: true\n        useLocalSessionState: true\n        rewriteBatchedStatements: true\n        cacheResultSetMetadata: true\n        cacheServerConfiguration: true\n        elideSetAutoCommits: true\n        maintainTimeStats: false\n\n---\nspring.config.activate.on-profile: staging\n\nstorage:\n  datasource:\n    core:\n      driver-class-name: com.mysql.cj.jdbc.Driver\n      jdbc-url: jdbc:mysql://${storage.database.core-db.url}\n      username: ${storage.database.core-db.username}\n      password: ${storage.database.core-db.password}\n      maximum-pool-size: 5\n      connection-timeout: 1100\n      keepalive-time: 30000\n      validation-timeout: 1000\n      max-lifetime: 600000\n      pool-name: core-db-pool\n      data-source-properties:\n        socketTimeout: 3000\n        cachePrepStmts: true\n        prepStmtCacheSize: 250\n        prepStmtCacheSqlLimit: 2048\n        useServerPrepStmts: true\n        useLocalSessionState: true\n        rewriteBatchedStatements: true\n        cacheResultSetMetadata: true\n        cacheServerConfiguration: true\n        elideSetAutoCommits: true\n        maintainTimeStats: false\n\n---\nspring.config.activate.on-profile: live\n\nstorage:\n  datasource:\n    core:\n      driver-class-name: com.mysql.cj.jdbc.Driver\n      jdbc-url: jdbc:mysql://${storage.database.core-db.url}\n      username: ${storage.database.core-db.username}\n      password: ${storage.database.core-db.password}\n      maximum-pool-size: 25\n      connection-timeout: 1100\n      keepalive-time: 30000\n      validation-timeout: 1000\n      max-lifetime: 600000\n      pool-name: core-db-pool\n      data-source-properties:\n        socketTimeout: 3000\n        cachePrepStmts: true\n        prepStmtCacheSize: 250\n        prepStmtCacheSqlLimit: 2048\n        useServerPrepStmts: true\n        useLocalSessionState: true\n        rewriteBatchedStatements: true\n        cacheResultSetMetadata: true\n        cacheServerConfiguration: true\n        elideSetAutoCommits: true\n        maintainTimeStats: false"
  },
  {
    "path": "storage/db-core/src/test/java/io/dodn/springboot/storage/db/CoreDbContextTest.java",
    "content": "package io.dodn.springboot.storage.db;\n\nimport org.junit.jupiter.api.Tag;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.context.ActiveProfiles;\nimport org.springframework.test.context.TestConstructor;\n\n@ActiveProfiles(\"local\")\n@Tag(\"context\")\n@SpringBootTest\n@TestConstructor(autowireMode = TestConstructor.AutowireMode.ALL)\npublic abstract class CoreDbContextTest {\n\n}\n"
  },
  {
    "path": "storage/db-core/src/test/java/io/dodn/springboot/storage/db/CoreDbTestApplication.java",
    "content": "package io.dodn.springboot.storage.db;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.boot.context.properties.ConfigurationPropertiesScan;\n\n@ConfigurationPropertiesScan\n@SpringBootApplication\npublic class CoreDbTestApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(CoreDbTestApplication.class, args);\n    }\n\n}\n"
  },
  {
    "path": "storage/db-core/src/test/java/io/dodn/springboot/storage/db/core/ExampleRepositoryIT.java",
    "content": "package io.dodn.springboot.storage.db.core;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport io.dodn.springboot.storage.db.CoreDbContextTest;\n\nimport org.junit.jupiter.api.Test;\n\npublic class ExampleRepositoryIT extends CoreDbContextTest {\n\n    private final ExampleRepository exampleRepository;\n\n    public ExampleRepositoryIT(ExampleRepository exampleRepository) {\n        this.exampleRepository = exampleRepository;\n    }\n\n    @Test\n    public void testShouldBeSavedAndFound() {\n        ExampleEntity saved = exampleRepository.save(new ExampleEntity(\"SPRING_BOOT\"));\n        assertThat(saved.getExampleColumn()).isEqualTo(\"SPRING_BOOT\");\n\n        ExampleEntity found = exampleRepository.findById(saved.getId()).get();\n        assertThat(found.getExampleColumn()).isEqualTo(\"SPRING_BOOT\");\n    }\n\n}\n"
  },
  {
    "path": "storage/db-core/src/test/resources/application.yml",
    "content": "spring.application.name: db-core-test\n\nspring:\n  config:\n    import:\n      - db-core.yml\n"
  },
  {
    "path": "support/logging/build.gradle",
    "content": "dependencies {\n    implementation 'org.springframework.boot:spring-boot-starter-opentelemetry'\n    implementation \"io.sentry:sentry-logback:${property(\"sentryVersion\")}\"\n}\n"
  },
  {
    "path": "support/logging/src/main/resources/logback/logback-dev.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <include resource=\"org/springframework/boot/logging/logback/defaults.xml\"/>\n\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <encoder>\n            <pattern>%clr(%d{HH:mm:ss.SSS}){faint}|%clr(${level:-%5p})|%32X{traceId:-},%16X{spanId:-}|%clr(%-40.40logger{39}){cyan}%clr(|){faint}%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>\n            <charset>utf8</charset>\n        </encoder>\n    </appender>\n\n    <appender name=\"SENTRY\" class=\"io.sentry.logback.SentryAppender\">\n        <options>\n            <dsn>YOUR_DSN</dsn>\n        </options>\n        <minimumEventLevel>WARN</minimumEventLevel>\n        <minimumBreadcrumbLevel>INFO</minimumBreadcrumbLevel>\n    </appender>\n\n    <logger name=\"org.springframework\" level=\"WARN\"/>\n    <logger name=\"io.dodn.springboot\" level=\"INFO\"/>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n        <appender-ref ref=\"SENTRY\"/>\n    </root>\n</configuration>\n"
  },
  {
    "path": "support/logging/src/main/resources/logback/logback-live.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <include resource=\"org/springframework/boot/logging/logback/defaults.xml\"/>\n\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <encoder>\n            <pattern>%clr(%d{HH:mm:ss.SSS}){faint}|%clr(${level:-%5p})|%32X{traceId:-},%16X{spanId:-}|%clr(%-40.40logger{39}){cyan}%clr(|){faint}%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>\n            <charset>utf8</charset>\n        </encoder>\n    </appender>\n\n    <appender name=\"SENTRY\" class=\"io.sentry.logback.SentryAppender\">\n        <options>\n            <dsn>YOUR_DSN</dsn>\n        </options>\n        <minimumEventLevel>WARN</minimumEventLevel>\n        <minimumBreadcrumbLevel>INFO</minimumBreadcrumbLevel>\n    </appender>\n\n    <logger name=\"org.springframework\" level=\"WARN\"/>\n    <logger name=\"io.dodn.springboot\" level=\"INFO\"/>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n        <appender-ref ref=\"SENTRY\"/>\n    </root>\n</configuration>\n"
  },
  {
    "path": "support/logging/src/main/resources/logback/logback-local-dev.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <include resource=\"org/springframework/boot/logging/logback/defaults.xml\"/>\n\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <encoder>\n            <pattern>%clr(%d{HH:mm:ss.SSS}){faint}|%clr(${level:-%5p})|%32X{traceId:-},%16X{spanId:-}|%clr(%-40.40logger{39}){cyan}%clr(|){faint}%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>\n            <charset>utf8</charset>\n        </encoder>\n    </appender>\n\n    <logger name=\"org.springframework\" level=\"INFO\"/>\n    <logger name=\"io.dodn.springboot\" level=\"DEBUG\"/>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n    </root>\n</configuration>\n"
  },
  {
    "path": "support/logging/src/main/resources/logback/logback-local.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <include resource=\"org/springframework/boot/logging/logback/defaults.xml\"/>\n\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <encoder>\n            <pattern>%clr(%d{HH:mm:ss.SSS}){faint}|%clr(${level:-%5p})|%32X{traceId:-},%16X{spanId:-}|%clr(%-40.40logger{39}){cyan}%clr(|){faint}%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>\n            <charset>utf8</charset>\n        </encoder>\n    </appender>\n\n    <logger name=\"org.springframework\" level=\"INFO\"/>\n    <logger name=\"io.dodn.springboot\" level=\"DEBUG\"/>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n    </root>\n</configuration>\n"
  },
  {
    "path": "support/logging/src/main/resources/logback/logback-staging.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n    <include resource=\"org/springframework/boot/logging/logback/defaults.xml\"/>\n\n    <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n        <encoder>\n            <pattern>%clr(%d{HH:mm:ss.SSS}){faint}|%clr(${level:-%5p})|%32X{traceId:-},%16X{spanId:-}|%clr(%-40.40logger{39}){cyan}%clr(|){faint}%m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>\n            <charset>utf8</charset>\n        </encoder>\n    </appender>\n\n    <appender name=\"SENTRY\" class=\"io.sentry.logback.SentryAppender\">\n        <options>\n            <dsn>YOUR_DSN</dsn>\n        </options>\n        <minimumEventLevel>WARN</minimumEventLevel>\n        <minimumBreadcrumbLevel>INFO</minimumBreadcrumbLevel>\n    </appender>\n\n    <logger name=\"org.springframework\" level=\"WARN\"/>\n    <logger name=\"io.dodn.springboot\" level=\"INFO\"/>\n\n    <root level=\"INFO\">\n        <appender-ref ref=\"STDOUT\"/>\n        <appender-ref ref=\"SENTRY\"/>\n    </root>\n</configuration>\n"
  },
  {
    "path": "support/logging/src/main/resources/logging.yml",
    "content": "logging.config: classpath:logback/logback-${spring.profiles.active}.xml\n\nmanagement.otlp.metrics.export.enabled: false"
  },
  {
    "path": "support/monitoring/build.gradle",
    "content": "dependencies {\n    implementation 'org.springframework.boot:spring-boot-starter-actuator'\n    runtimeOnly 'io.micrometer:micrometer-registry-prometheus'\n}\n"
  },
  {
    "path": "support/monitoring/src/main/resources/monitoring.yml",
    "content": "management:\n  endpoints:\n    web:\n      exposure:\n        include: prometheus\n"
  },
  {
    "path": "tests/api-docs/build.gradle",
    "content": "dependencies {\n    api 'org.springframework.boot:spring-boot-restdocs'\n    api 'org.springframework.restdocs:spring-restdocs-mockmvc'\n    compileOnly 'org.junit.jupiter:junit-jupiter-api'\n}\n"
  },
  {
    "path": "tests/api-docs/src/main/java/io/dodn/springboot/test/api/RestDocsTest.java",
    "content": "package io.dodn.springboot.test.api;\n\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.jupiter.api.Tag;\nimport org.junit.jupiter.api.extension.ExtendWith;\nimport org.springframework.restdocs.RestDocumentationContextProvider;\nimport org.springframework.restdocs.RestDocumentationExtension;\nimport org.springframework.restdocs.mockmvc.MockMvcRestDocumentation;\nimport org.springframework.test.web.servlet.MockMvc;\nimport org.springframework.test.web.servlet.setup.MockMvcBuilders;\n\n@Tag(\"restdocs\")\n@ExtendWith(RestDocumentationExtension.class)\npublic abstract class RestDocsTest {\n\n    protected MockMvc mockMvc;\n\n    private RestDocumentationContextProvider restDocumentation;\n\n    @BeforeEach\n    public void setUp(RestDocumentationContextProvider restDocumentation) {\n        this.restDocumentation = restDocumentation;\n    }\n\n    protected MockMvc mockController(Object controller) {\n        return MockMvcBuilders.standaloneSetup(controller)\n            .apply(MockMvcRestDocumentation.documentationConfiguration(restDocumentation))\n            .build();\n    }\n\n}\n"
  }
]