add:国际化配置

This commit is contained in:
zhangzq
2026-01-04 19:18:37 +08:00
parent 86029545ee
commit dd3463f5d7
4 changed files with 6 additions and 0 deletions

View File

@@ -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 失效"));
}

View File

@@ -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/**

View File

@@ -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'