This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
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.
- Loading branch information
Showing
110 changed files
with
1,910 additions
and
1,249 deletions.
There are no files selected for viewing
10 changes: 8 additions & 2 deletions
10
daemawiki-api/src/main/java/org/daemawiki/config/AppConfig.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 |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package org.daemawiki.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import reactor.core.scheduler.Scheduler; | ||
import reactor.core.scheduler.Schedulers; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class AppConfig { | ||
|
||
/** | ||
* boundedElastic 스케줄러를 빈으로 등록 | ||
* | ||
* @return boundedElastic 스케줄러 | ||
*/ | ||
@Bean | ||
public Scheduler scheduler() { | ||
return Schedulers.boundedElastic(); | ||
} | ||
|
||
} | ||
|
30 changes: 15 additions & 15 deletions
30
daemawiki-api/src/main/java/org/daemawiki/domain/auth/api/AuthController.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 |
---|---|---|
@@ -1,44 +1,44 @@ | ||
package org.daemawiki.domain.auth.api; | ||
|
||
import jakarta.validation.Valid; | ||
import org.daemawiki.domain.auth.dto.request.LoginRequest; | ||
import org.daemawiki.domain.auth.dto.request.ReissueRequest; | ||
import org.daemawiki.domain.auth.dto.response.TokenResponse; | ||
import org.daemawiki.domain.auth.dto.request.SignupRequest; | ||
import org.daemawiki.domain.auth.service.Login; | ||
import org.daemawiki.domain.auth.service.Reissue; | ||
import org.daemawiki.domain.auth.service.Signup; | ||
import jakarta.validation.Valid; | ||
import org.daemawiki.domain.auth.dto.response.TokenResponse; | ||
import org.daemawiki.domain.auth.usecase.ReissueUsecase; | ||
import org.daemawiki.domain.auth.usecase.SigninUsecase; | ||
import org.daemawiki.domain.auth.usecase.SignupUsecase; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.bind.annotation.*; | ||
import reactor.core.publisher.Mono; | ||
|
||
@RestController | ||
@RequestMapping("/api/auth") | ||
public class AuthController { | ||
private final Login loginService; | ||
private final Signup signupService; | ||
private final Reissue reissue; | ||
private final SigninUsecase signinUsecase; | ||
private final SignupUsecase signupUsecase; | ||
private final ReissueUsecase reissueUsecase; | ||
|
||
public AuthController(Login loginService, Signup signupService, Reissue reissue) { | ||
this.loginService = loginService; | ||
this.signupService = signupService; | ||
this.reissue = reissue; | ||
public AuthController(SigninUsecase signinUsecase, SignupUsecase signupUsecase, ReissueUsecase reissueUsecase) { | ||
this.signinUsecase = signinUsecase; | ||
this.signupUsecase = signupUsecase; | ||
this.reissueUsecase = reissueUsecase; | ||
} | ||
|
||
@PostMapping("/login") | ||
public Mono<TokenResponse> login(@Valid @RequestBody LoginRequest request) { | ||
return loginService.execute(request); | ||
return signinUsecase.signin(request); | ||
} | ||
|
||
@PostMapping("/signup") | ||
@ResponseStatus(HttpStatus.CREATED) | ||
public Mono<Void> signup(@Valid @RequestBody SignupRequest request) { | ||
return signupService.execute(request); | ||
return signupUsecase.signup(request); | ||
} | ||
|
||
@PostMapping("/reissue") | ||
public Mono<TokenResponse> reissue(@Valid @RequestBody ReissueRequest request) { | ||
return reissue.execute(request); | ||
return reissueUsecase.reissue(request); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
daemawiki-api/src/main/java/org/daemawiki/domain/auth/usecase/ReissueUsecase.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,10 @@ | ||
package org.daemawiki.domain.auth.usecase; | ||
|
||
import org.daemawiki.domain.auth.dto.request.ReissueRequest; | ||
import org.daemawiki.domain.auth.dto.response.TokenResponse; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface ReissueUsecase { | ||
Mono<TokenResponse> reissue(ReissueRequest request); | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
daemawiki-api/src/main/java/org/daemawiki/domain/auth/usecase/SigninUsecase.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,10 @@ | ||
package org.daemawiki.domain.auth.usecase; | ||
|
||
import org.daemawiki.domain.auth.dto.request.LoginRequest; | ||
import org.daemawiki.domain.auth.dto.response.TokenResponse; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface SigninUsecase { | ||
Mono<TokenResponse> signin(LoginRequest request); | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
daemawiki-api/src/main/java/org/daemawiki/domain/auth/usecase/SignupUsecase.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,9 @@ | ||
package org.daemawiki.domain.auth.usecase; | ||
|
||
import org.daemawiki.domain.auth.dto.request.SignupRequest; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface SignupUsecase { | ||
Mono<Void> signup(SignupRequest request); | ||
|
||
} |
10 changes: 6 additions & 4 deletions
10
...aemawiki/domain/auth/service/Reissue.java → .../domain/auth/usecase/service/Reissue.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
20 changes: 11 additions & 9 deletions
20
.../daemawiki/domain/auth/service/Login.java → ...n/auth/usecase/service/SigninService.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
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
9 changes: 9 additions & 0 deletions
9
daemawiki-api/src/main/java/org/daemawiki/domain/content/usecase/AddContentTableUsecase.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,9 @@ | ||
package org.daemawiki.domain.content.usecase; | ||
|
||
import org.daemawiki.domain.content.dto.AddContentRequest; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface AddContentTableUsecase { | ||
Mono<Void> add(AddContentRequest request, String documentId); | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...iki-api/src/main/java/org/daemawiki/domain/content/usecase/RemoveContentTableUsecase.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,9 @@ | ||
package org.daemawiki.domain.content.usecase; | ||
|
||
import org.daemawiki.domain.content.dto.DeleteContentRequest; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface RemoveContentTableUsecase { | ||
Mono<Void> remove(DeleteContentRequest request, String documentId); | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...pi/src/main/java/org/daemawiki/domain/content/usecase/UpdateContentTableTitleUsecase.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,9 @@ | ||
package org.daemawiki.domain.content.usecase; | ||
|
||
import org.daemawiki.domain.content.dto.EditContentTableTitleRequest; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface UpdateContentTableTitleUsecase { | ||
Mono<Void> update(EditContentTableTitleRequest request, String documentId); | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
daemawiki-api/src/main/java/org/daemawiki/domain/content/usecase/WriteContentUsecase.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 org.daemawiki.domain.content.usecase; | ||
|
||
import org.daemawiki.domain.content.dto.WriteContentRequest; | ||
import reactor.core.publisher.Mono; | ||
|
||
public interface WriteContentUsecase { | ||
Mono<Void> write(WriteContentRequest request, String documentId); | ||
} |
Oops, something went wrong.