forked from github/dataease
feat: 国际化
This commit is contained in:
parent
dcf8fe751b
commit
29d275f2f7
@ -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;
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user