Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #23

Merged
merged 71 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
35241b2
:tada: Start payment service
nowgnas Nov 18, 2023
b715463
:memo: Amend ignore file
nowgnas Nov 19, 2023
52a3897
Merge pull request #1 from nowgnas/config/init
binarywoo27 Nov 19, 2023
1fe2e57
초기 설정 및 Entity 생성
binarywoo27 Nov 21, 2023
2bf339e
Merge pull request #2 from lotteon2/LF1-306-payment-config
nowgnas Nov 21, 2023
c48fd82
feat: 단건결제API 추가
binarywoo27 Nov 22, 2023
6563290
ammend: controller 리턴값 추가
binarywoo27 Nov 22, 2023
ebaa4ba
Jacoco setting 및 service, repository 테스트
binarywoo27 Nov 22, 2023
29556fb
controller 테스트
binarywoo27 Nov 22, 2023
23a3772
controller 테스트 삭제
binarywoo27 Nov 22, 2023
c0586e0
fix: 외부API 로직 분리, 트랙잭션 추가
binarywoo27 Nov 23, 2023
5d5f295
Merge pull request #3 from lotteon2/LF1-302-single-payment
qwerty1434 Nov 23, 2023
52c4924
feat: KakaopayApproveRequestDto 추가
binarywoo27 Nov 23, 2023
7a1797a
feat: 결제승인 API 테스트 코드
binarywoo27 Nov 24, 2023
68c9619
Merge pull request #4 from lotteon2/LF1-302-single-payment-approval
qwerty1434 Nov 24, 2023
580c32f
Create deploy-dev.yml
nowgnas Nov 25, 2023
e06e1bd
Merge pull request #5 from lotteon2/nowgnas-patch-1
nowgnas Nov 27, 2023
c4ac300
:bug: OrderId 타입 수정 및 결제정보 저장 순서 수정
binarywoo27 Dec 7, 2023
c2f6545
Merge pull request #6 from lotteon2/LF1-473-subscription-ready
qwerty1434 Dec 7, 2023
c20d69e
update deploy dev
nowgnas Dec 15, 2023
65822bd
:memo: OrderType을 넘겨주기 위한 ApproveUrl 수정
binarywoo27 Dec 18, 2023
1de87d3
:twisted_rightwards_arrows: Merged from origin develop
binarywoo27 Dec 18, 2023
6543ac1
:bug: 자잘한 오류 해결
binarywoo27 Dec 20, 2023
a49be01
:green_heart: Yml 수정
binarywoo27 Dec 20, 2023
c1184ad
Update application-prod.yml
nowgnas Dec 26, 2023
084cbe9
yml file update
binarywoo27 Dec 26, 2023
937b72a
불필요한 코드 삭제 및 CommonResponse로 바꾸기
binarywoo27 Dec 26, 2023
fd511c2
gradle 설정
binarywoo27 Dec 26, 2023
d5f8d37
Merge pull request #7 from lotteon2/hotfix/develop
nowgnas Dec 26, 2023
ad1d8ba
build.gradle 의존성 수정
binarywoo27 Dec 26, 2023
bce6725
💚 의존성 수정 및 CommonResponse로 변경
binarywoo27 Dec 26, 2023
3b9e4fa
Merge pull request #8 from lotteon2/hotfix/develop
qwerty1434 Dec 27, 2023
9a571a2
Update application-prod.yml
nowgnas Dec 29, 2023
68c2547
:green_heart: Yml 설정 오류 수정
binarywoo27 Dec 29, 2023
51865bf
Merge pull request #9 from lotteon2/fix/develop
JIUNG9 Dec 29, 2023
6cd49de
:bug: Yml 파일 수정
binarywoo27 Dec 29, 2023
77e6f86
:memo: Url 변수명 수정
binarywoo27 Dec 29, 2023
4b9db93
:sparkles: 정기결제 API 및 Test Code
binarywoo27 Dec 29, 2023
e913e1a
:bug: 결제 버그 해결
binarywoo27 Dec 29, 2023
6f5c932
:bug: Git의 파일 대소문자 인식 오류 해결 시도
binarywoo27 Dec 30, 2023
6cd8710
:bug: Git의 파일 대소문자 인식 오류 해결 시도
binarywoo27 Dec 30, 2023
e5f4a45
Merge pull request #13 from lotteon2/cherrypick/feature/subscription
binarywoo27 Dec 30, 2023
4bbdd15
:sparkles: 배치 정기결제(2회차 이후) API 및 Test code
binarywoo27 Jan 2, 2024
bce7758
Merge pull request #14 from lotteon2/LF1-910-batch
qwerty1434 Jan 2, 2024
f91d25d
:sparkles: 배치 정기결제 로직 및 Test Code
binarywoo27 Jan 3, 2024
9c3e014
Merge pull request #15 from lotteon2/LF1-910-batch
qwerty1434 Jan 3, 2024
4f699e7
:bug: OrderType 제거 및 Feign client 요청 처리 추가
binarywoo27 Jan 5, 2024
22ae34e
Merge pull request #16 from lotteon2/LF1-910-batch
qwerty1434 Jan 5, 2024
b8085bc
:bug: Url 수정
binarywoo27 Jan 5, 2024
cb67a08
Merge branch 'develop' into LF1-910-batch
nowgnas Jan 5, 2024
eca19af
Merge pull request #17 from lotteon2/LF1-910-batch
nowgnas Jan 5, 2024
e1a5846
:bug: RequestParam -> RequestBody로 수정
binarywoo27 Jan 8, 2024
b059a84
:bug: Feign url 수정
binarywoo27 Jan 9, 2024
23e16fc
fix: BaseEntity isDeleted=false 추가
binarywoo27 Jan 9, 2024
9eb3935
fix: fix typo
binarywoo27 Jan 10, 2024
2f7081d
Merge pull request #18 from lotteon2/fix/develop
indl1670 Jan 10, 2024
fb5cf98
fix: JPQL수정
binarywoo27 Jan 10, 2024
5135759
docs: add release docs
nowgnas Jan 10, 2024
bd2202c
Merge pull request #19 from lotteon2/fix/develop
indl1670 Jan 10, 2024
a0654a2
fix: build.gradle
binarywoo27 Jan 10, 2024
841c79c
Merge branch 'fix/develop' of https://github.com/lotteon2/BB-PAYMENT-…
binarywoo27 Jan 10, 2024
e4aaf1f
Merge pull request #20 from lotteon2/fix/develop
qwerty1434 Jan 11, 2024
6973c99
feature: 결제 취소(배송주문) API 및 Test Code
binarywoo27 Jan 12, 2024
8bcbc51
Update build.gradle
nowgnas Jan 13, 2024
e51afd6
fix: 배치 정기결제 로직 수정 및 정기결제 취소 API 추가
binarywoo27 Jan 14, 2024
93fce7e
Merge branch 'develop' into fix/develop
binarywoo27 Jan 15, 2024
49ecd78
Merge pull request #21 from lotteon2/fix/develop
qwerty1434 Jan 15, 2024
c321a30
fix: 불필요한 정기결제 KafkaConsumer 삭제
binarywoo27 Jan 17, 2024
99071a3
Merge branch 'fix/develop' of https://github.com/lotteon2/BB-PAYMENT-…
binarywoo27 Jan 17, 2024
abbf10c
Merge branch 'develop' into fix/develop
binarywoo27 Jan 17, 2024
a3f2108
Merge pull request #22 from lotteon2/fix/develop
qwerty1434 Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name-template: "Payment v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🆕 새로운 기능이 추가되었어요!"
label: "✨ Feature"
- title: "🐞 자잘한 버그를 수정했습니다."
label: "🐞 Bugfix"
- title: "🫶🏻 앱 사용성 개선에 힘썼습니다."
label: "🫶🏻 Improvement"
- title: "🛠️ 더 나은 코드를 위해 노력하고 있습니다."
labels:
- "🔨 Refactor"
- "⚙️ Setting"
- title: "ETC"
labels:
- "*"
change-template: "* $TITLE (#$NUMBER) by @$AUTHOR"
change-title-escapes: '\<*_&#@`'
exclude-labels:
- "Main"
version-resolver:
major:
labels:
- "Major"
minor:
labels:
- "Minor"
patch:
labels:
- "Patch"
default: patch
template: |
$CHANGES
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR build


on:
pull_request:
branches: [ develop ] # develop branch에 PR을 보낼 때 실행

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

# Gradle wrapper 파일 실행 권한주기
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Gradle test를 실행한다
- name: build gradle
run: ./gradlew clean build
26 changes: 26 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: develop deployment
on:
push:
branches:
- 'develop'
jobs:
deployment:
environment: develop
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DEV_DOCKER_ID }}
password: ${{ secrets.DEV_DOCKER_PW }}
- name: deploy
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: nowgnas/bb:payment
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release Tag

on:
push:
branches:
- main

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: release.yml
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}

deployment:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write
steps:
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

# Set the new tag as a variable
- name: Set New Tag Variable
id: set_new_tag
run: echo "NEW_TAG=${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_ENV

- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
- name: Checkout
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DEV_DOCKER_ID }}
password: ${{ secrets.DEV_DOCKER_PW }}

- name: deploy
id: docker_build
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: nowgnas/bb-payment:${{ steps.tag_version.outputs.new_tag }}, nowgnas/bb-payment:latest
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
*.DS_Store
docker.sh
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM adoptopenjdk:11-hotspot AS builder
ENV USE_PROFILE local

COPY gradlew .
COPY gradle gradle
COPY build.gradle .
COPY settings.gradle .
COPY src src
RUN chmod +x ./gradlew
RUN ./gradlew clean bootJar

FROM adoptopenjdk:11-hotspot
COPY --from=builder build/libs/*.jar app.jar

ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=${USE_PROFILE}", "/app.jar"]
116 changes: 116 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.17'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'jacoco'
}

group = 'kr.bb'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '11'
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

ext {
set('springCloudVersion', "2021.0.8")
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
testImplementation 'junit:junit:4.13.1'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.kafka:spring-kafka'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'io.github.lotteon-maven:blooming-blooms-utils:202401140749'
runtimeOnly 'com.h2database:h2'
implementation 'mysql:mysql-connector-java:8.0.33'
testImplementation 'org.mock-server:mockserver-netty:5.11.2' // 사용 중인 MockServer 버전
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'io.micrometer:micrometer-registry-prometheus:1.12.2'
}

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}

tasks.named('bootBuildImage') {
builder = 'paketobuildpacks/builder-jammy-base:latest'
}

tasks.named('test') {
useJUnitPlatform()
}

// jacoco
jacoco {
toolVersion = '0.8.5'
}

jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
element = 'CLASS'

limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 0.80
}
excludes = ["*.mapper*"]
}
}
}

test {
jacoco {
destinationFile = file("$buildDir/jacoco/jacoco.exec")
}
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}

jacocoTestReport {
reports {
html.required = true
}
def Qdomains = []
for (qPattern in '**/QA'..'**/QZ') {
Qdomains.add(qPattern + '*')
}
afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
"**/*Application*",
"**/*generated*",
"**/*mapper*",
"**/*Config*",
"**/*Dto*",
] + Qdomains)
})
)
}
finalizedBy 'jacocoTestCoverageVerification'
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading