Skip to content

Commit fca2ce2

Browse files
TinySnowabel533
authored andcommitted
Fixed typo in common module
1 parent 6aec7bd commit fca2ce2

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

common/src/main/java/io/mybatis/common/core/Code.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class Code {
2828
public static final I18n.Language LANG = I18n.language(CODE_BUNDLE);
2929
public static final Code SUCCESS = new Code("00000");
3030
public static final Code FAILURE = new Code("M0100");
31-
public static final Code UNKONWN = new Code("M0200");
31+
public static final Code UNKNOWN = new Code("M0200");
3232
public static final Code SAVE_FAILURE = new Code("M0201");
3333
public static final Code UPDATE_FAILURE = new Code("M0202");
3434
public static final Code DELETE_FAILURE = new Code("M0203");

common/src/main/java/io/mybatis/common/core/Response.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ public static Response ok() {
4747
}
4848

4949
public static Response error() {
50-
return error(Code.UNKONWN);
50+
return error(Code.UNKNOWN);
5151
}
5252

5353
public static Response error(String code) {
5454
return error(code, I18n.message(RESPONSE_BUNDLE, code));
5555
}
5656

5757
public static Response error(Throwable t) {
58-
return error(Code.UNKONWN.getCode(), t.getMessage());
58+
return error(Code.UNKNOWN.getCode(), t.getMessage());
5959
}
6060

6161
public static Response error(ServiceException e) {

common/src/main/resources/mybatis_common_code_en.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
00000=Success
1717
M0100=Failure
18-
M0200=Unkonwn
18+
M0200=Unknown
1919
M0201=Save failure
2020
M0202=Update failure
2121
M0203=Delete failure

common/src/test/java/io/mybatis/common/util/I18nTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void testCode() {
2828
Locale.setDefault(Locale.CHINA);
2929
org.junit.Assert.assertEquals("操作成功", Code.SUCCESS.getMessage());
3030
org.junit.Assert.assertEquals("操作失败", Code.FAILURE.getMessage());
31-
org.junit.Assert.assertEquals("未知错误", Code.UNKONWN.getMessage());
31+
org.junit.Assert.assertEquals("未知错误", Code.UNKNOWN.getMessage());
3232
org.junit.Assert.assertEquals("保存失败", Code.SAVE_FAILURE.getMessage());
3333
org.junit.Assert.assertEquals("修改失败", Code.UPDATE_FAILURE.getMessage());
3434
org.junit.Assert.assertEquals("删除失败", Code.DELETE_FAILURE.getMessage());

0 commit comments

Comments
 (0)