-
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.
Merge pull request #47 from jurumarble/dev
Dev
- Loading branch information
Showing
32 changed files
with
733 additions
and
261 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
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
12 changes: 12 additions & 0 deletions
12
src/main/java/co/kr/jurumarble/comment/controller/converter/StringToEnumConverter.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,12 @@ | ||
package co.kr.jurumarble.comment.controller.converter; | ||
|
||
import co.kr.jurumarble.comment.enums.CommentType; | ||
import org.springframework.core.convert.converter.Converter; | ||
|
||
public class StringToEnumConverter implements Converter<String, CommentType> { | ||
|
||
@Override | ||
public CommentType convert(String source) { | ||
return CommentType.valueOf(source.toUpperCase()); | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
src/main/java/co/kr/jurumarble/comment/enums/CommentType.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,24 @@ | ||
package co.kr.jurumarble.comment.enums; | ||
|
||
import co.kr.jurumarble.common.enums.EnumModel; | ||
|
||
public enum CommentType implements EnumModel { | ||
VOTES("투표"), | ||
DRINKS("우리술"); | ||
|
||
private String value; | ||
|
||
CommentType(String value) { | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String getKey() { | ||
return name(); | ||
} | ||
|
||
@Override | ||
public String getValue() { | ||
return value; | ||
} | ||
} |
Oops, something went wrong.