-
Notifications
You must be signed in to change notification settings - Fork 0
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
Null 295 api docs refactor and pagination #28
Changes from all commits
ca0217d
086007c
04c685c
2afd126
c4b5a3b
d0dce05
c5452cb
dee6ac8
ab9f272
f2ae9bd
4f17236
819e592
0eaac1a
5d6e81b
15a6f18
3100e53
70da3df
92a3566
ed8e771
82c0c4a
560ac63
2a79899
4015af4
f4369a1
85a957f
442fb87
6e208f8
d962d4f
aa080b9
1e51d11
a8356f3
e458072
3aa797c
fd0b930
049eff7
85e4494
a220d08
9ce7b9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.example.oatnote.event.listener; | ||
|
||
import java.util.ArrayList; | ||
|
||
import org.springframework.context.event.EventListener; | ||
import org.springframework.stereotype.Component; | ||
|
||
import com.example.oatnote.event.model.UserRegisteredEvent; | ||
import com.example.oatnote.memoTag.service.tag.TagService; | ||
import com.example.oatnote.memoTag.service.tag.model.Tag; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class CreateRootTagListener { | ||
|
||
private final TagService tagService; | ||
|
||
@EventListener | ||
public void handleUserRegisteredEvent(UserRegisteredEvent event) { | ||
createDummyTagsForNewUser(event.userId()); | ||
} | ||
|
||
private void createDummyTagsForNewUser(String userId) { | ||
Tag rootTag = new Tag( | ||
userId, | ||
"@", | ||
userId, | ||
new ArrayList<>() | ||
); | ||
tagService.saveTag(rootTag); | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ½λ ν¨μΉμ λν κ°λ¨ν 리뷰μ λλ€. λ²κ·Έ 리μ€ν¬
κ°μ μ μ
μ λ°μ μΌλ‘ μ½λ ꡬ쑰λ μ λμ΄ μμ§λ§, μ μ¬νλ€μ κ³ λ €νμ¬ μΆκ°μ μΈ μμ μ±κ³Ό κ°λ μ±μ κ°μ ν μ μμ΅λλ€. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.example.oatnote.event.model; | ||
|
||
public record UserRegisteredEvent( | ||
String userId | ||
) { | ||
|
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ΄ μ½λ ν¨μΉλ
μ 체μ μΌλ‘ μ΄ μ½λλ κ°λ¨νμ§λ§, μμ κ°μ κ°μ μ¬νμ μΆκ°νλ€λ©΄ λμ± μμ μ μ΄κ³ μ μ§λ³΄μνκΈ° μ¬μ΄ μ½λκ° λ κ²μ λλ€. |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
κ²°κ΅ μ΄ λ°©μμΌλ£¨ κ°μ ¨κ΅¬λ§