2 qq 19905553 qq_19905553 于 2014.11.27 16:07 提问

url里多了个jsessionid

http://192.168.65.99:8080/misscandy/User/findAllUsers.form
昨天按钮跳转还是上面的地址,今天就变成下面的了,奇怪的是我没动代码 = =
http://192.168.65.99:8080/misscandy/;jsessionid=617700E3F3AB748CB5BDC26AB3605F2CUser/findAllUsers.form

我用的spring mvc 注解 + spring

1个回答

qq_19905553
qq_19905553   2014.11.27 16:12

@Controller
@RequestMapping("/User")
public class UserController implements Serializable {

@Resource
private UserMapper userMapper;

@RequestMapping("/findUserByName.form")
public @ResponseBody
String findUserByName(HttpServletRequest request,
        HttpServletResponse response) throws IOException {

    request.setCharacterEncoding("UTF-8");
    response.setContentType("text/json;charset=UTF-8");
Csdn user default icon
上传中...
上传图片
插入图片