opt:1.加载国际化。

This commit is contained in:
2026-02-04 21:18:38 +08:00
parent 2f42985182
commit dbf27569d3
5 changed files with 27 additions and 3 deletions

View File

@@ -185,7 +185,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper,Task> implements Tas
HttpResponse result = scheduleTaskAPI.cancelTask(cancelTaskRequestParam.getTask_code()); HttpResponse result = scheduleTaskAPI.cancelTask(cancelTaskRequestParam.getTask_code());
if (result == null || !result.isOk()){ if (result == null || !result.isOk()){
log.info("取消调度任务失败"); log.info("取消调度任务失败");
throw new BadRequestException("取消调度任务失败"); throw new BadRequestException(LangProcess.msg("error_cancel_schedule_task"));
} }
taskMapper.update(new LambdaUpdateWrapper<>(Task.class) taskMapper.update(new LambdaUpdateWrapper<>(Task.class)

View File

@@ -0,0 +1,21 @@
package org.nl.config;
import org.nl.config.language.InitLocaleResolver;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author dsh
* 2025/8/25
*/
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Bean
public LocaleResolver localeResolver(){
return new InitLocaleResolver();
}
}

View File

@@ -1,2 +1,3 @@
error_schedule_point = 获取调度地图点位信息失败 error_schedule_point = 获取调度地图点位信息失败
error_cannot_update = 不能修改他人资料 error_cannot_update = 不能修改他人资料
error_cancel_schedule_task = 取消调度任务失败

View File

@@ -1,2 +1,3 @@
error_schedule_point = Failed to obtain the dispatch map location information error_schedule_point = Failed to obtain the dispatch map location information
error_cannot_update = You cannot modify other people's information error_cannot_update = You cannot modify other people's information
error_cancel_schedule_task = Canceling the scheduling task failed

View File

@@ -1,2 +1,3 @@
error_schedule_point = 获取调度地图点位信息失败 error_schedule_point = 获取调度地图点位信息失败
error_cannot_update = 不能修改他人资料 error_cannot_update = 不能修改他人资料
error_cancel_schedule_task = 取消调度任务失败