{"id":23161325,"url":"https://github.com/slicequeue/spring-boot-boilerplate-jpa-mysql-flyway","last_synced_at":"2025-04-04T19:29:18.158Z","repository":{"id":155138217,"uuid":"600372956","full_name":"slicequeue/spring-boot-boilerplate-jpa-mysql-flyway","owner":"slicequeue","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-11T13:52:56.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T04:29:45.439Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slicequeue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-11T09:36:53.000Z","updated_at":"2023-02-11T12:27:57.000Z","dependencies_parsed_at":"2023-05-15T13:45:10.164Z","dependency_job_id":null,"html_url":"https://github.com/slicequeue/spring-boot-boilerplate-jpa-mysql-flyway","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":"slicequeue/spring-boot-boilerplate-jpa-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slicequeue","download_url":"https://codeload.github.com/slicequeue/spring-boot-boilerplate-jpa-mysql-flyway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247237260,"owners_count":20906264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T23:13:54.510Z","updated_at":"2025-04-04T19:29:18.144Z","avatar_url":"https://github.com/slicequeue.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot API Boilerplate\n- slicequeue! spring boot api boilerplate 프로젝트\n  - JPA 적용, MySQL 데이터베이스 사용 + flyway db 이력관리\n  - 테스트용 데이터베이스 H2 사용\n\n## 구성\nSpring Boot RESTful API 전용 프로젝트\n+ JPA 적용, MySQL 데이터베이스 사용  + flyway db 이력관리, 테스트용 데이터베이스 H2 사용\n\n### 폴더 구조\n- TBU\n\n### 사용 라이브러리\nbuild.gradle 구성 내용 설명\n* JAVA 17\n#### plugin\n* 'org.springframework.boot' version 2.7.5\n#### dependencies\n* spring-boot-starter 관련 - plugin-version 2.7.5\n  * spring-boot-starter-web\n  * spring-boot-starter-test - junit jupiter\n  * spring-boot-starter-actuator\n  * spring-boot-starter-data-jpa\n* database\n  * implementation mysql:mysql-connector-java:8.0.28 - MySQL 커넥터\n  * testRuntimeOnly com.h2database:h2 - 테스트용 인메모리 H2\n* DB version history \u0026 migration \n  * org.flywaydb:flyway-mysql - mysql 8 이상\n* micrometer \u0026 prometheus\n  * io.micrometer:micrometer-registry-prometheus:1.8.4\n* logback \u0026 log4j 취약점 대응\n  * ch.qos.logback:logback-core:1.2.10\n  * ch.qos.logback:logback-classic:1.2.10\n  * org.slf4j:slf4j-api:1.7.32\n  * org.slf4j:jul-to-slf4j:1.7.32\n  * org.apache.logging.log4j:log4j-to-slf4j:2.17.1\n  * org.apache.logging.log4j:log4j-api:2.17.1\n\n## 초기 세팅\n프로젝트 초기 세팅 관련 설정법 기술\n* main.resources.application.yml 설정\n  * DB_URL: 데이터에비스 접속\n    * 예시 (H2 in mem): jdbc:h2:mem:testdb;MODE=MySQL;DATABASE_TO_UPPER=FALSE\n    * 예시 (H2 in local): jdbc:h2:~:testdb;MODE=MySQL;DATABASE_TO_UPPER=FALSE\n  * DB_USER: DB 계정 아이디\n    * 예시(H2 in mem):\n  * DB_PASS: DB 계정 비밀번호\n    * 예시(H2 in mem):\n  * DB_POOL_SIZE: DB Hikari PoolSize\n    * 예시(H2 in mem):\n* test.resources.application.yml 설정\n  * application.yml 에 H2 인메모리 DB 로 설정 고정\n    * 상황에 맞게 직조작 할 것\n\n### 액티브프로파일 설정\n* jvm active profile 값 설정, IntelliJ 실행 설정으로 처리\n  * 기본 설정값 관련해서는 예시용으로 작성한 logback-local.xml `local` 로 설정해야 작동\n* JUnit 테스트 실행시에는 test.java.resources 부분에 application.yml 설정 적용되며\n  * 각 테스트에 ActiveProfile 어노테이션으로 `test` 로 지정함\n\n### FLYWAY 적용\nmain.resources.db.migration 내에 버전 파일 생성하여 적용\n참고: https://www.notion.so/Spring-Boot-JPA-FLYWAY-I-c748269048d940f887f4907e12b37df5?pvs=4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslicequeue%2Fspring-boot-boilerplate-jpa-mysql-flyway/lists"}