问题原因分析
该错误是由于前后端版本不匹配导致。后端升级到支持Vue3的版本后,新增了tplWebType参数,但前端仍使用旧版代码未传递该参数。
修改后端控制器
在GenController中调整importTableSave方法参数,使其兼容旧版前端:
public AjaxResult importTableSave(String tables, @RequestParam("tplWebType") String tplWebType)
5.将其修改为
@PostMapping("/importTable")
public AjaxResult importTableSave(String tables, @RequestParam(value = "tplWebType", required = false) String tplWebType) {
// 方法实现保持不变
}
关键修改点:
- 添加required = false使参数变为可选
- 方法内部需处理tplWebType为null的情况





