@RequestMapping(value = "/add", method = RequestMethod.POST)
public ModelAndView add(HttpServletRequest request,
HttpServletResponse response, ZqbpCommonSerlect item) {
ConnectionSource connectionSource = DBUtil.getConnectionSource();
try {
Dao dao = DaoManager.createDao(connectionSource,
ZqbpCommonSerlect.class);
item.setSelectId(UUID.randomUUID().toString().replaceAll("-", ""));
dao.create(item);
connectionSource.close();
} catch (SQLException e) {
return jsonError(request, "保存失败", "");
}
return jsonSuccess(request, "保存成功!", getBasePath(request)+ "admin/chanpin/index.html");
《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《

为什么还能正常打开?是不是这个地址并不是modelAndView数据所传递的地址?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
看看你这个Controller是否有父类,有的话看看父类里是否有这个方法。。。用编辑器也可以直接跳转啊
当然是传给视图,这个modelandview对象就是controller处理后返回的赛