Skip to content

Commit

Permalink
Feature/#74/auth kakao login (#77)
Browse files Browse the repository at this point in the history
* Feature/#65/response code and message (#68)

* feat: [#65] ResponseCodeAndMessage Enum 추가 및 BaseResponse 생성자 추가

* fix: Apple Silicon에서 Docker-Compose 파일 정상 동작 하도록 platform 옵션 추가

* refactor: [#65] Note Controller 및 Note ControllerTest에 대한 ResponseCodeAndMessage 수정

* refactor: [#65] Card Controller 및 Card ControllerTest에 대한 ResponseCodeAndMessage 수정

* refactor: [#65] Content Controller 및 Content ControllerTest에 대한 ResponseCodeAndMessage 수정

* docs: api 문서 업데이트

* Feature/#70/api exception handle (#71)

* refactor: [#70] ResponseCodeAndMessage -> ResponseCodeAndMessages로 이름 변경

* refactor: [#70] interface CodeAndMessages 삭제

* chore: [#70] BaseResponse 부분 파라미터 변수 수정

* feat: [#70] Exception 처리를 위한 BaseException 및 ErrorCodeAndMessages, ExceptionHandler 추가

* feat: [#70] Domain Not Found 관련 Exception Class 생성

* refactor: [#70] Exception 사용하는 Service 및 Service Test 수정

* feat: [#74] 로그인 초기 작업 세팅 (Config, build.gradle 등)

* feat: [#74] config 추가설정 (TestConfig 포함)

* feat: [#74] Kakao Login 구현

* test: [#74] 로그인 기능 관련 테스트 추가 및 기존 컨트롤러 테스트에 Header 부분 추가

* feat: [#74] Card 관련 Login 로직 추가 및 리팩토링 진행 + 테스트 리팩토링

* feat: [#74] 로그인 관련 코드 수정 및 테스트 격리에 사용되는 데이터 수정

* feat: [#74] Content 관련 리팩토링 진행

* feat: [#74] Note 관련 리팩토링 진행

* docs: [#74] Restdocs 적용 완료
  • Loading branch information
nathan29849 authored Mar 7, 2023
1 parent 6ed1267 commit 9c6afc5
Show file tree
Hide file tree
Showing 72 changed files with 1,629 additions and 351 deletions.
5 changes: 5 additions & 0 deletions BE/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ gradle-app.setting
# Java heap dump
*.hprof

# application.yml
application.yml
application-local.yml
application-prod.yml

# End of https://www.toptal.com/developers/gitignore/api/macos,java,gradle
48 changes: 31 additions & 17 deletions BE/BOOT-INF/classes/static/docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,19 +456,19 @@ <h1>Spring REST Docs</h1>
</li>
<li><a href="#_단어_카드card">단어 카드(Card)</a>
<ul class="sectlevel2">
<li><a href="#resources-create-card">1. [GET] 단어 단일 조회</a></li>
<li><a href="#resources-create-card">2. [GET] 단어 모두 조회</a></li>
<li><a href="#resources-get-one-card">1. [GET] 단어 단일 조회</a></li>
<li><a href="#resources-get-all-cards">2. [GET] 단어 모두 조회</a></li>
<li><a href="#resources-create-card">3. [POST] 단어 카드 생성</a></li>
<li><a href="#_4_put_단어_카드_수정">4. [PUT] 단어 카드 수정</a></li>
<li><a href="#_5_delete_단어_카드_삭제">5. [DELETE] 단어 카드 삭제</a></li>
<li><a href="#resources-update-card">4. [PUT] 단어 카드 수정</a></li>
<li><a href="#resources-delete-card">5. [DELETE] 단어 카드 삭제</a></li>
</ul>
</li>
<li><a href="#_카드_내용content">카드 내용(Content)</a>
<ul class="sectlevel2">
<li><a href="#resources-create-content">1. [GET] 내용 전체 조회</a></li>
<li><a href="#_2_post_내용_생성">2. [POST] 내용 생성</a></li>
<li><a href="#_3_put_내용_수정">3. [PUT] 내용 수정</a></li>
<li><a href="#_4_delete_내용_삭제">4. [DELETE] 내용 삭제</a></li>
<li><a href="#resources-get-all-contents">1. [GET] 내용 전체 조회</a></li>
<li><a href="#resources-create-content">2. [POST] 내용 생성</a></li>
<li><a href="#resources-update-content">3. [PUT] 내용 수정</a></li>
<li><a href="#resources-delete-content">4. [DELETE] 내용 삭제</a></li>
</ul>
</li>
</ul>
Expand All @@ -487,6 +487,7 @@ <h4 id="_http_request"><a class="link" href="#_http_request">HTTP request</a></h
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/note/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Accept: application/json
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -591,6 +592,7 @@ <h4 id="_http_request_2"><a class="link" href="#_http_request_2">HTTP request</a
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/note?page=0&amp;size=5 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Accept: application/json
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -720,6 +722,7 @@ <h4 id="_http_request_3"><a class="link" href="#_http_request_3">HTTP request</a
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">POST /api/note HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Content-Length: 47
Host: localhost:8080

Expand Down Expand Up @@ -822,6 +825,7 @@ <h4 id="_http_request_4"><a class="link" href="#_http_request_4">HTTP request</a
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">PUT /api/note/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Content-Length: 33
Host: localhost:8080

Expand Down Expand Up @@ -983,6 +987,7 @@ <h4 id="_http_request_5"><a class="link" href="#_http_request_5">HTTP request</a
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">DELETE /api/note/1 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Host: localhost:8080</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1033,13 +1038,14 @@ <h2 id="_단어_카드card"><a class="link" href="#_단어_카드card">단어
<div class="sectionbody">
<hr>
<div class="sect2">
<h3 id="resources-create-card"><a class="link" href="#resources-create-card">1. [GET] 단어 단일 조회</a></h3>
<h3 id="resources-get-one-card"><a class="link" href="#resources-get-one-card">1. [GET] 단어 단일 조회</a></h3>
<div class="sect3">
<h4 id="_http_request_6"><a class="link" href="#_http_request_6">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/note/1/card/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Accept: application/json
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -1185,13 +1191,14 @@ <h4 id="_response_fields_2"><a class="link" href="#_response_fields_2">Response
</div>
</div>
<div class="sect2">
<h3 id="resources-create-card"><a class="link" href="#resources-create-card">2. [GET] 단어 모두 조회</a></h3>
<h3 id="resources-get-all-cards"><a class="link" href="#resources-get-all-cards">2. [GET] 단어 모두 조회</a></h3>
<div class="sect3">
<h4 id="_http_request_7"><a class="link" href="#_http_request_7">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/note/1/card?page=0&amp;size=5 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Accept: application/json
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -1351,6 +1358,7 @@ <h4 id="_http_request_8"><a class="link" href="#_http_request_8">HTTP request</a
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">POST /api/note/1/card HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Content-Length: 47
Host: localhost:8080

Expand Down Expand Up @@ -1490,13 +1498,14 @@ <h4 id="_response_fields_4"><a class="link" href="#_response_fields_4">Response
</div>
</div>
<div class="sect2">
<h3 id="_4_put_단어_카드_수정"><a class="link" href="#_4_put_단어_카드_수정">4. [PUT] 단어 카드 수정</a></h3>
<h3 id="resources-update-card"><a class="link" href="#resources-update-card">4. [PUT] 단어 카드 수정</a></h3>
<div class="sect3">
<h4 id="_http_request_9"><a class="link" href="#_http_request_9">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">PUT /api/note/1/card/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Content-Length: 33
Host: localhost:8080

Expand Down Expand Up @@ -1640,12 +1649,13 @@ <h4 id="_response_fields_5"><a class="link" href="#_response_fields_5">Response
</div>
</div>
<div class="sect2">
<h3 id="_5_delete_단어_카드_삭제"><a class="link" href="#_5_delete_단어_카드_삭제">5. [DELETE] 단어 카드 삭제</a></h3>
<h3 id="resources-delete-card"><a class="link" href="#resources-delete-card">5. [DELETE] 단어 카드 삭제</a></h3>
<div class="sect3">
<h4 id="_http_request_10"><a class="link" href="#_http_request_10">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">DELETE /api/note/1/card/1 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Host: localhost:8080</code></pre>
</div>
</div>
Expand Down Expand Up @@ -1738,13 +1748,14 @@ <h2 id="_카드_내용content"><a class="link" href="#_카드_내용content">카
<div class="sectionbody">
<hr>
<div class="sect2">
<h3 id="resources-create-content"><a class="link" href="#resources-create-content">1. [GET] 내용 전체 조회</a></h3>
<h3 id="resources-get-all-contents"><a class="link" href="#resources-get-all-contents">1. [GET] 내용 전체 조회</a></h3>
<div class="sect3">
<h4 id="_http_request_11"><a class="link" href="#_http_request_11">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/note/1/card/1/content?page=0&amp;size=5 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Accept: application/json
Host: localhost:8080</code></pre>
</div>
Expand Down Expand Up @@ -1884,13 +1895,14 @@ <h4 id="_response_fields_7"><a class="link" href="#_response_fields_7">Response
</div>
</div>
<div class="sect2">
<h3 id="_2_post_내용_생성"><a class="link" href="#_2_post_내용_생성">2. [POST] 내용 생성</a></h3>
<h3 id="resources-create-content"><a class="link" href="#resources-create-content">2. [POST] 내용 생성</a></h3>
<div class="sect3">
<h4 id="_http_request_12"><a class="link" href="#_http_request_12">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">POST /api/note/1/card/1/content HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Content-Length: 71
Host: localhost:8080

Expand Down Expand Up @@ -2046,13 +2058,14 @@ <h4 id="_response_fields_8"><a class="link" href="#_response_fields_8">Response
</div>
</div>
<div class="sect2">
<h3 id="_3_put_내용_수정"><a class="link" href="#_3_put_내용_수정">3. [PUT] 내용 수정</a></h3>
<h3 id="resources-update-content"><a class="link" href="#resources-update-content">3. [PUT] 내용 수정</a></h3>
<div class="sect3">
<h4 id="_http_request_13"><a class="link" href="#_http_request_13">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">PUT /api/note/1/card/1/content/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Content-Length: 70
Host: localhost:8080

Expand Down Expand Up @@ -2212,12 +2225,13 @@ <h4 id="_response_fields_9"><a class="link" href="#_response_fields_9">Response
</div>
</div>
<div class="sect2">
<h3 id="_4_delete_내용_삭제"><a class="link" href="#_4_delete_내용_삭제">4. [DELETE] 내용 삭제</a></h3>
<h3 id="resources-delete-content"><a class="link" href="#resources-delete-content">4. [DELETE] 내용 삭제</a></h3>
<div class="sect3">
<h4 id="_http_request_14"><a class="link" href="#_http_request_14">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">DELETE /api/note/1/card/1/content/1 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3aGF0ZXZlci1ub3RlLXNlcnZlciIsInN1YiI6InByb2plY3QtdGVzdC1hY2Nlc3MtdG9rZW4iLCJhdWQiOiIxIiwiZXhwIjoxNjc3OTE1MjI2fQ.Q5UcK6Z7L_zLULI-1wXkbCoOfM4ELpKxKCVID8D1k08
Host: localhost:8080</code></pre>
</div>
</div>
Expand Down Expand Up @@ -2313,7 +2327,7 @@ <h4 id="_response_fields_10"><a class="link" href="#_response_fields_10">Respons
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2023-01-10 00:38:13 +0900
Last updated 2023-03-04 16:25:31 +0900
</div>
</div>
</body>
Expand Down
25 changes: 24 additions & 1 deletion BE/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,44 @@ repositories {
mavenCentral()
}

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

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

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
testImplementation 'org.testng:testng:7.1.0'
testImplementation 'org.testng:testng:7.7.0'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'mysql:mysql-connector-java'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'

// Feign Client
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'

// Wire Mock
testImplementation "org.springframework.cloud:spring-cloud-starter-contract-stub-runner"

// JWT
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5', 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// test containers
testImplementation "org.testcontainers:junit-jupiter:1.17.2"
testImplementation "org.testcontainers:mysql:1.17.2"

// config processor
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
}

ext {
Expand Down
11 changes: 8 additions & 3 deletions BE/src/docs/asciidoc/api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ include::{snippets}/delete-note/http-response.adoc[]

---

[[resources-create-card]]
[[resources-get-one-card]]
=== 1. [GET] 단어 단일 조회

==== HTTP request
Expand All @@ -133,7 +133,7 @@ include::{snippets}/get-one-card/response-fields.adoc[]

---

[[resources-create-card]]
[[resources-get-all-cards]]
=== 2. [GET] 단어 모두 조회

==== HTTP request
Expand Down Expand Up @@ -179,6 +179,7 @@ include::{snippets}/create-card/response-fields.adoc[]

---

[[resources-update-card]]
=== 4. [PUT] 단어 카드 수정

==== HTTP request
Expand All @@ -198,6 +199,7 @@ include::{snippets}/update-card/response-fields.adoc[]

---

[[resources-delete-card]]
=== 5. [DELETE] 단어 카드 삭제

==== HTTP request
Expand All @@ -218,7 +220,7 @@ include::{snippets}/delete-card/response-fields.adoc[]

---

[[resources-create-content]]
[[resources-get-all-contents]]
=== 1. [GET] 내용 전체 조회

==== HTTP request
Expand All @@ -239,6 +241,7 @@ include::{snippets}/get-all-contents/response-fields.adoc[]

---

[[resources-create-content]]
=== 2. [POST] 내용 생성

==== HTTP request
Expand All @@ -261,6 +264,7 @@ include::{snippets}/create-content/response-fields.adoc[]

---

[[resources-update-content]]
=== 3. [PUT] 내용 수정

==== HTTP request
Expand All @@ -283,6 +287,7 @@ include::{snippets}/update-content/response-fields.adoc[]

---

[[resources-delete-content]]
=== 4. [DELETE] 내용 삭제

==== HTTP request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public BaseResponse(String code, String message, T data) {
this.data = data;
}

public BaseResponse(ResponseCodeAndMessages codeAndMessages, T data) {
public BaseResponse(CodeAndMessages codeAndMessages, T data) {
this.code = codeAndMessages.getCode();
this.message = codeAndMessages.getMessage();
this.data = data;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package dev.whatevernote.be.common;

public interface CodeAndMessages {

String getCode();

String getMessage();

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.whatevernote.be.common;

public enum ResponseCodeAndMessages {
public enum ResponseCodeAndMessages implements CodeAndMessages{


// NOTE
Expand All @@ -23,6 +23,10 @@ public enum ResponseCodeAndMessages {
CONTENT_REMOVE_SUCCESS("S-C003", "컨텐트 삭제를 성공했습니다."),
CONTENT_RETRIEVE_DETAIL_SUCCESS("S-C004", "컨텐트 개별 상세 조회를 성공했습니다."),
CONTENT_RETRIEVE_ALL_SUCCESS("S-C005", "컨텐트 전체 조회를 성공했습니다."),

// OAUTH LOGIN
OAUTH_LOGIN_SUCCESS("S-L001", "소셜 로그인에 성공했습니다."),
REISSUE_ACCESS_TOKEN_SUCCESS("S-L002", "ACCESS TOKEN 재발급에 성공했습니다."),
;

private final String code;
Expand Down
Loading

0 comments on commit 9c6afc5

Please sign in to comment.