feat: 国际化

This commit is contained in:
taojinlong 2021-05-18 09:57:57 +08:00
parent dcf8fe751b
commit 29d275f2f7
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,14 @@
package io.dataease.controller.handler.annotation;
import io.dataease.commons.constants.I18nConstants;
import java.lang.annotation.*;
@Documented
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface I18n {
String value() default I18nConstants.LANG_COOKIE_NAME;
}

View File

@ -0,0 +1,24 @@
package io.dataease.exception;
public class DataEaseException extends RuntimeException {
private DataEaseException(String message) {
super(message);
}
private DataEaseException(Throwable t) {
super(t);
}
public static void throwException(String message) {
throw new DataEaseException(message);
}
public static DataEaseException getException(String message) {
throw new DataEaseException(message);
}
public static void throwException(Throwable t) {
throw new DataEaseException(t);
}
}