add:国际化配置
This commit is contained in:
Binary file not shown.
@@ -58,6 +58,7 @@ public class GlobalExceptionHandler {
|
||||
@ExceptionHandler(value = NotLoginException.class)
|
||||
public ResponseEntity<ApiError> notLoginException(Exception e) {
|
||||
// log.error(ThrowableUtil.getStackTrace(e));
|
||||
e.printStackTrace();
|
||||
log.error("token超时:-------------------------------------" + e.getMessage());
|
||||
return buildResponseEntity(ApiError.error(401, "token 失效"));
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ security:
|
||||
excludes:
|
||||
# 认证
|
||||
- /auth/login
|
||||
- /error
|
||||
- /auth/code
|
||||
- /auth/logout
|
||||
- /webjars/**
|
||||
@@ -122,6 +123,7 @@ security:
|
||||
- /actuator/**
|
||||
# 上传
|
||||
- /api/localStorage/pictures
|
||||
- /api/language/**
|
||||
# 参数
|
||||
- /api/param/getValueByCode
|
||||
- /plumelog/**
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
// 国际化开发:3。增加文件获取接口
|
||||
export function fetchMessages(locale) {
|
||||
if (locale == null) {
|
||||
locale = 'zh'
|
||||
}
|
||||
return request({
|
||||
url: '/api/language/js/' + locale,
|
||||
method: 'get'
|
||||
|
||||
Reference in New Issue
Block a user