-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chatroom-dev-003-code-optimize (#190)
* use jdk 17, fix logger, remove no need code, format * format all java code with google formatter
- Loading branch information
Showing
13 changed files
with
292 additions
and
331 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
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
90 changes: 47 additions & 43 deletions
90
springChatRoom/src/main/java/com/yen/springChatRoom/bean/ChatMessage.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,47 +1,51 @@ | ||
package com.yen.springChatRoom.bean; | ||
|
||
public class ChatMessage { | ||
private MessageType type; | ||
private String content; | ||
private String sender; | ||
|
||
public MessageType getType() { | ||
return type; | ||
} | ||
|
||
public void setType(MessageType type) { | ||
this.type = type; | ||
} | ||
|
||
public String getContent() { | ||
return content; | ||
} | ||
|
||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
public String getSender() { | ||
return sender; | ||
} | ||
|
||
public void setSender(String sender) { | ||
this.sender = sender; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ChatMessage{" + | ||
"type=" + type + | ||
", content='" + content + '\'' + | ||
", sender='" + sender + '\'' + | ||
'}'; | ||
} | ||
|
||
public enum MessageType { | ||
CHAT, | ||
JOIN, | ||
LEAVE | ||
} | ||
|
||
private MessageType type; | ||
private String content; | ||
private String sender; | ||
|
||
public MessageType getType() { | ||
return type; | ||
} | ||
|
||
public void setType(MessageType type) { | ||
this.type = type; | ||
} | ||
|
||
public String getContent() { | ||
return content; | ||
} | ||
|
||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
public String getSender() { | ||
return sender; | ||
} | ||
|
||
public void setSender(String sender) { | ||
this.sender = sender; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ChatMessage{" | ||
+ "type=" | ||
+ type | ||
+ ", content='" | ||
+ content | ||
+ '\'' | ||
+ ", sender='" | ||
+ sender | ||
+ '\'' | ||
+ '}'; | ||
} | ||
|
||
public enum MessageType { | ||
CHAT, | ||
JOIN, | ||
LEAVE | ||
} | ||
} |
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
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
Oops, something went wrong.