-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ChatController): 테스트를 위한 컨트롤러, 서비스 클래스 추가
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/main/java/com/aliens/backend/chat/controller/ChatController.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,32 @@ | ||
package com.aliens.backend.chat.controller; | ||
|
||
import com.aliens.backend.chat.service.ChatService; | ||
import org.springframework.messaging.handler.annotation.MessageMapping; | ||
import org.springframework.stereotype.Controller; | ||
|
||
|
||
@Controller | ||
public class ChatController { | ||
|
||
private final ChatService chatService; | ||
|
||
public ChatController(ChatService chatService) { | ||
this.chatService = chatService; | ||
} | ||
|
||
@MessageMapping("/send") | ||
public void sendMessage() { | ||
chatService.sendMessage(); | ||
} | ||
|
||
@MessageMapping("/read") | ||
public void readMessage() { | ||
chatService.readMessage(); | ||
} | ||
|
||
@MessageMapping("/summary") | ||
public void getChatSummary() { | ||
chatService.getChatSummary(); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/aliens/backend/chat/service/ChatService.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,15 @@ | ||
package com.aliens.backend.chat.service; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
public class ChatService { | ||
public void sendMessage() { | ||
} | ||
|
||
public void readMessage() { | ||
} | ||
|
||
public void getChatSummary() { | ||
} | ||
} |