Skip to content

Commit bd207ad

Browse files
Merge branch 'develop'
2 parents 24cf15f + 180149a commit bd207ad

14 files changed

Lines changed: 159 additions & 53 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "๐Ÿ› Bug Report"
2+
description: "๋ฒ„๊ทธ ๋ฆฌํฌํŠธ ์ž‘์„ฑ"
3+
title: "[Bug] "
4+
labels: ["bug"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: ๐Ÿ“„ ์„ค๋ช…
9+
description: ๋ฐœ์ƒํ•œ ๋ฒ„๊ทธ์— ๋Œ€ํ•ด ์„ค๋ช…ํ•ด ์ฃผ์„ธ์š”.
10+
placeholder: ์ž์„ธํžˆ ์ ์„์ˆ˜๋ก ์ข‹์Šต๋‹ˆ๋‹ค!
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: ๐Ÿพ ์žฌํ˜„ ๋ฐฉ๋ฒ•
16+
description: ๋ฒ„๊ทธ๋ฅผ ์žฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ์ˆœ์„œ๋ฅผ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
17+
placeholder: |
18+
1. OOO ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•œ๋‹ค.
19+
2. OOO ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค.
20+
3. OOO ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.
21+
validations:
22+
required: true
23+
- type: textarea
24+
attributes:
25+
label: ๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท
26+
description: ๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด ์Šคํฌ๋ฆฐ์ƒท์„ ์ฒจ๋ถ€ํ•ด ์ฃผ์„ธ์š”.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "๐Ÿ“‘ Documentation"
2+
description: "๋ฌธ์„œ ์ถ”๊ฐ€ ๋˜๋Š” ์ˆ˜์ •"
3+
title: "[Docs] "
4+
labels: ["documentation"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: ๐Ÿ“„ ์„ค๋ช…
9+
description: ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์ˆ˜์ •ํ•  ๋ฌธ์„œ์— ๋Œ€ํ•ด ์„ค๋ช…ํ•ด ์ฃผ์„ธ์š”.
10+
placeholder: ์˜ˆ) README.md ํŒŒ์ผ ์—…๋ฐ์ดํŠธ, API ๋ฌธ์„œ ์ถ”๊ฐ€ ๋“ฑ
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: โœ… ์ž‘์—…ํ•  ๋‚ด์šฉ
16+
description: ํ•  ์ผ์„ ์ฒดํฌ๋ฐ•์Šค ํ˜•ํƒœ๋กœ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
17+
placeholder: |
18+
- [ ] OOO ๋ฌธ์„œ ์ดˆ์•ˆ ์ž‘์„ฑ
19+
- [ ] OOO ๋‚ด์šฉ ์ถ”๊ฐ€
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "โœจ Feature"
2+
description: "์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ์ถ”๊ฐ€"
3+
title: "[Feature] "
4+
labels: ["feature"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: ๐Ÿ“„ ์„ค๋ช…
9+
description: ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ ์„ค๋ช…์„ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
10+
placeholder: ์ž์„ธํžˆ ์ ์„์ˆ˜๋ก ์ข‹์Šต๋‹ˆ๋‹ค!
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: โœ… ์ž‘์—…ํ•  ๋‚ด์šฉ
16+
description: ํ•  ์ผ์„ ์ฒดํฌ๋ฐ•์Šค ํ˜•ํƒœ๋กœ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
17+
placeholder: ์ตœ๋Œ€ํ•œ ์„ธ๋ถ„ํ™” ํ•ด์„œ ์ ์–ด์ฃผ์„ธ์š”!
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: ๐Ÿ™‹๐Ÿป ์ฐธ๊ณ  ์ž๋ฃŒ
23+
description: ์ฐธ๊ณ  ์ž๋ฃŒ๊ฐ€ ์žˆ๋‹ค๋ฉด ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "๐Ÿ‘€ Refactor"
2+
description: "์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง"
3+
title: "[Refactor] "
4+
labels: ["refactor"]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: ๐ŸŽฏ ๊ฐœ์„ ํ•˜๋ ค๋Š” ๋ถ€๋ถ„
9+
description: ์–ด๋–ค ์ฝ”๋“œ๋‚˜ ๊ธฐ๋Šฅ์„ ๋ฆฌํŒฉํ† ๋งํ•  ๊ฒƒ์ธ์ง€ ์„ค๋ช…ํ•ด ์ฃผ์„ธ์š”.
10+
placeholder: ์˜ˆ) ๋กœ๊ทธ์ธ ๋กœ์ง, ์ปดํฌ๋„ŒํŠธ ๊ตฌ์กฐ ๋“ฑ
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: โœจ ๊ธฐ๋Œ€ ํšจ๊ณผ
16+
description: ๋ฆฌํŒฉํ† ๋ง์„ ํ†ตํ•ด ์–ป์„ ์ˆ˜ ์žˆ๋Š” ์ด์ ์„ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.
17+
placeholder: ์˜ˆ) ์ฝ”๋“œ ๊ฐ€๋…์„ฑ ํ–ฅ์ƒ, ์„ฑ๋Šฅ ๊ฐœ์„ , ์œ ์ง€๋ณด์ˆ˜ ์šฉ์ด์„ฑ ์ฆ๋Œ€ ๋“ฑ
18+
validations:
19+
required: true

โ€Ž.github/workflows/gradle.ymlโ€Ž

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-java@v1
2727
with:
2828
java-version: 17
29-
29+
3030
- name: Gradle Caching
3131
uses: actions/cache@v3
3232
with:
@@ -35,53 +35,4 @@ jobs:
3535
~/.gradle/wrapper
3636
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
3737
restore-keys: |
38-
${{ runner.os }}-gradle-
39-
40-
41-
- name: create application.yml in domain
42-
run: touch ./q-domain/src/main/resources/application-prod.yml
43-
&& echo "${{secrets.APPLICATION_DOMAIN}}" > ./q-domain/src/main/resources/application-prod.yml
44-
45-
- name: create application.yml in admin
46-
run: touch ./q-admin/src/main/resources/application-admin.yml
47-
&& echo "${{secrets.APPLICATION_ADMIN}}" > ./q-admin/src/main/resources/application-admin.yml
48-
49-
- uses: actions/upload-artifact@v2
50-
with:
51-
name: application-domain.yml
52-
path: ./q-domain/src/main/resources/application-prod.yml
53-
54-
55-
- uses: actions/upload-artifact@v2
56-
with:
57-
name: application-admin.yml
58-
path: ./q-admin/src/main/resources/application-admin.yml
59-
60-
- name: Grant execute permission for gradlew
61-
run: chmod +x gradlew
62-
63-
- name: Build with Gradle
64-
run: ./gradlew clean bootJar
65-
66-
- name: Make zip file
67-
run: zip -qq -r ./$GITHUB_SHA.zip .
68-
shell: bash
69-
70-
# AWS ์‚ฌ์šฉ์ž ์ •๋ณด ์ž…๋ ฅ
71-
- name: Configure AWS credentials
72-
uses: aws-actions/configure-aws-credentials@v1
73-
with:
74-
aws-region: ap-northeast-2
75-
aws-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
76-
aws-secret-access-key: ${{ secrets.ACCESS_KEY_SECRET }}
77-
78-
# S3์— zip ํŒŒ์ผ ์—…๋กœ๋“œ
79-
- name: Upload to S3
80-
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://${{ secrets.S3_BUCKET_NAME }}/deploy-spring/$GITHUB_SHA.zip --source .
81-
82-
- name: Code Deploy
83-
run: aws deploy create-deployment --application-name ${{ secrets.CODE_DEPLOY_APP_NAME }}
84-
--deployment-config-name CodeDeployDefault.OneAtATime
85-
--deployment-group-name ${{ secrets.CODE_DEPLOY_DEPLOYMENT_GROUP_NAME }}
86-
--s3-location bucket=${{ secrets.S3_BUCKET_NAME }},bundleType=zip,key=deploy-spring/$GITHUB_SHA.zip
87-
38+
${{ runner.os }}-gradle-

โ€Ž.gitignoreโ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ out/
4343
q-domain/src/main/resources/*.yml
4444
q-domain/src/main/resources/*.yaml
4545
q-admin/src/main/resources/*.yml
46-
4746
q-common/src/main/resources/application-common.yml
47+
q-infra/kafka/src/main/resources/application-infra.yml
48+
q-infra/kafka/src/main/resources/application-kafka.yml

โ€Žq-api/build.gradleโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
implementation project(":q-domain")
1212
implementation project(":q-admin")
1313
implementation project(":q-common")
14+
implementation project(":q-infra:kafka")
1415
}

โ€Žq-api/src/main/java/com/qcard/api/question/service/QuestionService.javaโ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import com.qcard.domains.account.entity.Account;
88
import com.qcard.domains.question.entity.Question;
99
import com.qcard.domains.question.service.QuestionDomainService;
10+
import com.qcard.dto.PersonalQuestionDto;
11+
import com.qcard.service.KafkaProducerService;
1012
import lombok.RequiredArgsConstructor;
1113
import lombok.extern.slf4j.Slf4j;
1214
import org.springframework.data.domain.Page;
@@ -18,6 +20,7 @@
1820
@RequiredArgsConstructor
1921
public class QuestionService {
2022
private final QuestionDomainService questionDomainService;
23+
private final KafkaProducerService<PersonalQuestionDto> kafkaProducerService;
2124

2225
public Page<QuestionRes> findQuestionsByParam(Account account, QuestionFilterReq questionFilterReq, Pageable pageable) {
2326
if(questionFilterReq.getMine() && account == null) {
@@ -41,6 +44,11 @@ public QuestionSimpleRes createQuestion(Account account, QuestionReq questionReq
4144
QuestionType.TYPE_CUSTOM
4245
);
4346

47+
kafkaProducerService.sendMessage(
48+
"personal-question",
49+
PersonalQuestionDto.builder().questionId(question.getId()).category(question.getCategory()).title(question.getTitle()).build()
50+
);
51+
4452
return new QuestionSimpleRes(question);
4553
}
4654
}

โ€Žq-api/src/main/resources/application.ymlโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ spring:
33
active:
44
- prods
55
- admin
6+
- kafka
67
group:
78
devs:
89
- dev

โ€Žq-infra/build.gradleโ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bootJar {
2+
enabled = false
3+
}
4+
jar {
5+
enabled = true
6+
}

0 commit comments

Comments
ย (0)