-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: ๋๋ฉ์ธ ์ํฐํฐ ์์ฑ (#2) * feat/#1: BaseTimeEntity ์์ฑ * feat/#1: Contact Entity ์์ฑ * feat/#1: Store Entity ์์ฑ * feat/#1: Recommendation Entity ์์ฑ * feat/#1: StoreImage Entity ์์ฑ * feat/#1: Theme Entity ์์ฑ * feat/#1: SongForm Entity ์์ฑ * chore/#1: ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ์ธก์ ์ ์ธ ์ค์ (์ ๊ฑฐ ์์ ) * chore/#1: sonarCloud projectKey ์์ * chore: ์๋ธ ๋ชจ๋ ํจํค์ง๋ช ๋ณ๊ฒฝ * feat: ๋ฉ์ธ ํ์ด์ง ๋งค์ฅ ๋ชฉ๋ก ์กฐํ API ๊ตฌํ (#8) * feat/#3: StoreRepository.findAllByOrderByCreatedAtAsc ๊ตฌํ * feat/#3: StoreService.findSimpleStores ๊ตฌํ * feat/#3: stores ์ ๋ ฌ ๊ธฐ์ค์ storeId ๋ก ๋ณ๊ฒฝ * feat/#3: DataBaseCleaner ๊ตฌํ * feat/#3: StoreController.findSimpleStores ๊ตฌํ * feat/#3: test application.yml ์ถ๊ฐ * feat/#3: ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ๋์์ domain ํจํค์ง ์ถ๊ฐ * feat/#3: ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ๋์์ vo ํจํค์ง ์ ์ธ * chore: jacoco ๋ ํฌํธ๋ฅผ sonarcloud ์ ๋ฐ์ (#10) * chore/#9: jacoco ๋ ํฌํธ๋ฅผ sonarcloud ์ ๋ฐ์ * chore/#9: ci run ์ jacocoTestReport ์ถ๊ฐ * feat: ๋งค์ฅ ๋ชฉ๋ก ์กฐํ API ๊ตฌํ (#11) * feat/#4: StoreRepository.findAllByRegionOrderByStoreIdAsc ๊ตฌํ * feat/#4: StoreService.findStores ๊ตฌํ * feat/#4: Store ์ Theme, SongForm ์ ๋ณด ์ถ๊ฐ * feat/#4: StoreController.storeService ๊ตฌํ * feat/#4: jacocoExcludePatterns ์ถ๊ฐ * feat/#4: jacoco ์ค์ ๋ณ๊ฒฝ * feat: ์์ ์ถ์ฒ API ๊ตฌํ (#12) * feat/#5: PhoneNumber ์์ฑ * feat/#5: RecommendationInformation ์์ฑ * feat/#5: Recommendation ์์ฑ * feat/#5: RecommendationRepository ์์ฑ * feat/#5: RecommendationService.registerRecommendation ๊ตฌํ * feat/#5: RecommendationController.registerRecommendation ๊ตฌํ * feat/#5: ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ๋์์ recommendation ํจํค์ง ์ถ๊ฐ * feat: ๋ฌธ์ API ๊ตฌํ (#13) * feat/#6: ContactUserName ์์ฑ * feat/#6: ContactContent ์์ฑ * feat/#6: Contact ์์ฑ * feat/#6: ContactRepository ์์ฑ * feat/#6: ContactService.registerContact ๊ตฌํ * feat/#6: ContactController.registerContact ๊ตฌํ * feat/#6: ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ๋์์ contact ํจํค์ง ์ถ๊ฐ * feat: ๋ฌธ์ ๋ฑ๋ก, ์์ ์ถ์ฒ ๋ฉ์ผ ํธ์ฌ ์๋ฆผ ๊ธฐ๋ฅ ๊ตฌํ (#14) * feat/#7: MailService.sendMail ๊ตฌํ * feat/#7: ๋ฌธ์ ๋ฑ๋ก, ์์ ์ถ์ฒ ์์ฒญ ์ ์ด๋ฉ์ผ ์๋ฆผ ์ ์ก ๊ธฐ๋ฅ ์ถ๊ฐ * chore: dev, prod profile ์ค์ (#16) * chore: ๊ฐ๋ฐ ์๋ฒ ๋ฐฐํฌ ์คํฌ๋ฆฝํธ ์์ฑ (#18) * chore/#17: ๋ฐฐํฌ ์คํฌ๋ฆฝํธ ์์ฑ * chore/#17: CD ์ค์ * chore: CodeDeploy ์ค์ ํ์ผ ๋ณ๊ฒฝ (#20) * chore: appspec.yml ์คํ ์์ * chore: owner ์์ * chore: ๋ฐฐํฌ ์คํฌ๋ฆฝํธ ์์ * chore: ๋ฐฐํฌ ์คํฌ๋ฆฝํธ ์์ * docs: API ๋ฌธ์ํ (#23) * docs/#21: RestDocs ์์กด์ฑ ์ถ๊ฐ ๋ฐ BaseControllerTest ์์ฑ * docs/#21: Controller ํ ์คํธ ์ฝ๋ ์์ฑ ๋ฐ ๋ฌธ์ํ * docs/#21: ์ฃผ์ ์ ๊ฑฐ * docs/#21: index.html ์์ฑ * chore: ๋ฐฐํฌ ์คํฌ๋ฆฝํธ ์์ (#25) * refactor/#22: ๋ฉ์ผ ํธ์ฌ ์๋ฆผ ๋ถ๋ฆฌ (#27) * refactor/#22: MailSendEvent, MailSendListener ์์ฑ * refactor/#22: AsyncConfig ์์ฑ * refactor/#22: SpringMailService.sendMail @async ์ ์ฉ ๋ฐ ์ฌ์๋ ๋ฉ์นด๋์ฆ ๊ตฌํ * refactor/#22: EventPublisher ๋ฅผ ์ฌ์ฉํ ๋ฉ์ผ ๋ฉ์๋ ํธ์ถ * refactor/#22: ๋ฉ์ผ ์ ์ก ์ฌ์๋ ํ ์คํธ ์ฝ๋ ์ถ๊ฐ * feat: ์๋ฆผ(Notification) ์ํฐํฐ ์์ฑ (#28) * chore: ๋ก๊ทธ์ ์๊ฐ์ด ๋์ค๋๋ก ๋ฐฐํฌ ์คํธ๋ฆฝํธ ์์ (#30) * chore: ๋ฐฐํฌ ํ๊ฒฝ ์ค์ (#32)
- Loading branch information
1 parent
251929f
commit 8d9fa9e
Showing
83 changed files
with
4,293 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
env: | ||
S3_BUCKET_NAME: verby-bucket | ||
PROJECT_NAME: indp-server | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.ACTIONS_TOKEN }} | ||
submodules: true | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Make zip file | ||
run: zip -r ./$GITHUB_SHA.zip . | ||
shell: bash | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-region: ap-northeast-2 | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS }} | ||
|
||
- name: Upload to S3 | ||
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$PROJECT_NAME/$GITHUB_SHA.zip | ||
|
||
- name: Code Deploy | ||
run: | | ||
aws deploy create-deployment \ | ||
--application-name verby-deploy \ | ||
--deployment-config-name CodeDeployDefault.AllAtOnce \ | ||
--deployment-group-name verby-dev \ | ||
--s3-location bucket=$S3_BUCKET_NAME,bundleType=zip,key=$PROJECT_NAME/$GITHUB_SHA.zip \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "src/main/resources/sever-secrets"] | ||
path = src/main/resources/sever-secrets | ||
url = https://github.com/team-verby/sever-secrets.git | ||
[submodule "src/main/resources/server-secrets"] | ||
path = src/main/resources/server-secrets | ||
url = https://github.com/team-verby/server-secrets.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 0.0 | ||
os: linux | ||
files: | ||
- source: / | ||
destination: /home/ubuntu/app/indp-server | ||
overwrite: true | ||
|
||
permissions: | ||
- object: / | ||
pattern: "**" | ||
owner: ubuntu | ||
group: ubuntu | ||
|
||
hooks: | ||
ApplicationStart: | ||
- location: scripts/deploy.sh | ||
timeout: 180 | ||
runas: ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
PROJECT_ROOT=/home/ubuntu/app | ||
PROJECT_NAME=indp-server | ||
APPLICATION_NAME=indp | ||
|
||
DEPLOY_PATH=$PROJECT_ROOT/deploy | ||
|
||
APP_LOG=$DEPLOY_PATH/application.log | ||
ERROR_LOG=$DEPLOY_PATH/deploy-error.log | ||
DEPLOY_LOG=$DEPLOY_PATH/deploy.log | ||
|
||
mkdir $DEPLOY_PATH | ||
|
||
echo "------------------------------------------------------------------------------------" >> $DEPLOY_LOG | ||
|
||
echo "[ $(date +%c) ] Build ํ์ผ ๋ณต์ฌ" >> $DEPLOY_LOG | ||
cp $PROJECT_ROOT/$PROJECT_NAME/build/libs/*.jar $DEPLOY_PATH/ | ||
|
||
echo "[ $(date +%c) ] ํ์ฌ ๊ตฌ๋ ์ค์ธ ์ ํ๋ฆฌ์ผ์ด์ pid ํ์ธ" >> $DEPLOY_LOG | ||
CURRENT_PID=$(pgrep -f $APPLICATION_NAME) | ||
|
||
echo "[ $(date +%c) ] ํ์ฌ ๊ตฌ๋ ์ค์ธ ์ ํ๋ฆฌ์ผ์ด์ pid: $CURRENT_PID" >> $DEPLOY_LOG | ||
if [ -z "$CURRENT_PID" ]; then | ||
echo "[ $(date +%c) ] ํ์ฌ ๊ตฌ๋ ์ค์ธ ์ ํ๋ฆฌ์ผ์ด์ ์ด ์์ผ๋ฏ๋ก ์ข ๋ฃํ์ง ์์ต๋๋ค." >> $DEPLOY_LOG | ||
else | ||
echo "[ $(date +%c) ] kill -15 $CURRENT_PID" >> $DEPLOY_LOG | ||
kill -15 "$CURRENT_PID" | ||
sleep 5 | ||
fi | ||
|
||
echo "[ $(date +%c) ] ์ ์ดํ๋ฆฌ์ผ์ด์ ๋ฐฐํฌ" >> $DEPLOY_LOG | ||
|
||
JAR_NAME=$(ls -tr "$DEPLOY_PATH" | grep jar | tail -n 1) | ||
|
||
echo "[ $(date +%c) ] JAR Name: $JAR_NAME" >> $DEPLOY_LOG | ||
nohup java -jar $DEPLOY_PATH/"$JAR_NAME" --spring.profiles.active=prod > $APP_LOG 2> $ERROR_LOG & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
= Indp Application API Document | ||
:doctype: book | ||
:source-highlighter: highlightjs | ||
:sectlinks: | ||
:toc: left | ||
:toclevels: 3 | ||
|
||
== ๋งค์ฅ (Store) | ||
|
||
=== ๋งค์ฅ ๋ชฉ๋ก ์กฐํ (๊ฐ๋จ ์ ๋ณด) | ||
|
||
==== Request | ||
|
||
operation::store-controller-test/find-simple-stores[snippets='http-request,query-parameters'] | ||
|
||
==== Response | ||
|
||
operation::store-controller-test/find-simple-stores[snippets='http-response,response-fields'] | ||
|
||
=== ๋งค์ฅ ๋ชฉ๋ก ์กฐํ | ||
|
||
==== Request | ||
|
||
operation::store-controller-test/find-stores[snippets='http-request,query-parameters'] | ||
|
||
==== Response | ||
|
||
operation::store-controller-test/find-stores[snippets='http-response,response-fields'] | ||
|
||
== ์์ ์ถ์ฒ (Recommendation) | ||
|
||
=== ์์ ์ถ์ฒํ๊ธฐ | ||
|
||
==== Request | ||
|
||
operation::recommendation-controller-test/register-recommendation[snippets='http-request,request-fields'] | ||
|
||
==== Response | ||
|
||
operation::recommendation-controller-test/register-recommendation[snippets='http-response,response-headers'] | ||
|
||
== ๋ฌธ์ (Contact) | ||
|
||
=== ๋ฌธ์ํ๊ธฐ | ||
|
||
==== Request | ||
|
||
operation::contact-controller-test/register-contact[snippets='http-request,request-fields'] | ||
|
||
==== Response | ||
|
||
operation::contact-controller-test/register-contact[snippets='http-response,response-headers'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.verby.indp.domain.common.dto; | ||
|
||
public record PageInfo(long totalElements, boolean hasNext) { | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/verby/indp/domain/common/entity/BaseTimeEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.verby.indp.domain.common.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.EntityListeners; | ||
import jakarta.persistence.MappedSuperclass; | ||
import java.time.LocalDateTime; | ||
import org.springframework.data.annotation.CreatedDate; | ||
import org.springframework.data.jpa.domain.support.AuditingEntityListener; | ||
|
||
@MappedSuperclass | ||
@EntityListeners(AuditingEntityListener.class) | ||
public abstract class BaseTimeEntity { | ||
|
||
@CreatedDate | ||
@Column(name = "created_at", updatable = false) | ||
protected LocalDateTime createdAt; | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/com/verby/indp/domain/common/event/MailSendEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.verby.indp.domain.common.event; | ||
|
||
import com.verby.indp.domain.notification.dto.Mail; | ||
|
||
public record MailSendEvent( | ||
Mail mail | ||
) { | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/verby/indp/domain/common/vo/Address.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.verby.indp.domain.common.vo; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Embeddable | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
public class Address { | ||
|
||
@Column(name = "address") | ||
private String address; | ||
|
||
} |
51 changes: 51 additions & 0 deletions
51
src/main/java/com/verby/indp/domain/common/vo/PhoneNumber.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.verby.indp.domain.common.vo; | ||
|
||
import static java.util.Objects.isNull; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Embeddable; | ||
import java.util.Objects; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Embeddable | ||
@NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) | ||
public class PhoneNumber { | ||
|
||
private static final String PHONE_NUMBER_PATTERN = "^[0-9]+$"; | ||
private static final int MAX_PHONE_NUMBER_SIZE = 50; | ||
|
||
@Column(name = "phone_number") | ||
private String phoneNumber; | ||
|
||
public PhoneNumber(String phoneNumber) { | ||
validatePhoneNumber(phoneNumber); | ||
|
||
this.phoneNumber = phoneNumber; | ||
} | ||
|
||
private void validatePhoneNumber(String phoneNumber) { | ||
validateBlank(phoneNumber); | ||
validateSize(phoneNumber); | ||
validateValue(phoneNumber); | ||
} | ||
|
||
private void validateSize(String phoneNumber) { | ||
if (phoneNumber.length() > MAX_PHONE_NUMBER_SIZE) { | ||
throw new IllegalArgumentException("์ ํ ๋ฒํธ์ ํฌ๊ธฐ๋ ์ต๋ 50์ ์ ๋๋ค."); | ||
} | ||
} | ||
|
||
private void validateValue(String phoneNumber) { | ||
if (!phoneNumber.matches(PHONE_NUMBER_PATTERN)) { | ||
throw new IllegalArgumentException("์ ํ ๋ฒํธ๋ ์ซ์๋ง ์ ๋ ฅ ๊ฐ๋ฅํฉ๋๋ค."); | ||
} | ||
} | ||
|
||
private void validateBlank(String phoneNumber) { | ||
if (isNull(phoneNumber) || phoneNumber.isBlank()) { | ||
throw new IllegalArgumentException("์ ํ ๋ฒํธ๋ฅผ ์ ๋ ฅํด์ฃผ์ธ์."); | ||
} | ||
} | ||
} |
Oops, something went wrong.