mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 05:12:07 +08:00
1、cf-gateway locale透传修复;2、LocaleResolver修改为全局web服务配置;
This commit is contained in:
+17
@@ -4,6 +4,8 @@ import com.cf.imes.framework.common.exception.enums.ServiceErrorCodeRange;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* 业务逻辑异常 Exception
|
||||
*/
|
||||
@@ -22,6 +24,8 @@ public final class ServiceException extends RuntimeException {
|
||||
*/
|
||||
private String message;
|
||||
|
||||
private Locale locale;
|
||||
|
||||
/**
|
||||
* 占位参数
|
||||
*/
|
||||
@@ -44,6 +48,19 @@ public final class ServiceException extends RuntimeException {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ServiceException(ErrorCode errorCode, Locale locale, Object... args) {
|
||||
this.code = errorCode.getCode();
|
||||
this.locale = locale;
|
||||
this.message = errorCode.getMsg();
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
public ServiceException(Integer code, Locale locale, String message) {
|
||||
this.code = code;
|
||||
this.locale = locale;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user