系统使用springMVC同时使用urlwrite,urlwirte规则如下:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
"http://tuckey.org/res/dtds/urlrewrite2.6.dtd">
<urlrewrite>
<rule>
<note>编辑数据</note>
<from>^/(\w+)/(\w+)/edit/(\w+).htm$</from>
<to type="forward">/$1/$2/edit.htm?id=$3</to>
</rule>
<rule>
<note>删除数据到回收站</note>
<from>^/(\w+)/(\w+)/trash/(\w+).htm$</from>
<to type="forward">/$1/$2/trash.htm?mulitId=$3</to>
</rule>
</urlrewrite>
请求为/admin/user/trash/1.htm会自动转到/admin/user/trash.htm?mulitId=1上,这个过程么有问题
但是在trash.htm处理方法如下:
public String trash(String mulitId) {
String[] ids = mulitId.split(",");
for (String id : ids) {
UserEntity userEntity = this.userEntityService.getObjById(Long
.parseLong(id));
userEntity.setStatus(-1);
this.userEntityService.update(userEntity);
}
return "redirect:list.htm";
}
最后一语句return "redirect:list.htm";这里使用了Spring的定向处理,而在urlwirte处理后变成了:/admin/user/trash.htm?mulitId=list
这个问题如何解决?
泛舟湖上清波郎朗