users@jersey.java.net

[Jersey] Why i can get form param use _at_QueryParam?

From: 张立鑫 <intelligentcodemail_at_gmail.com>
Date: Sat, 27 Jun 2015 22:56:55 +0800

@QueryParam("username")
public String username;
@QueryParam("remember")
public boolean remember;
@QueryParam("password")

@POST
@Path("login")
@Consumes("application/x-www-form-urlencoded")
@Produces("text/plain")
public Boolean login(@NotNull @FormParam("username") final String
username, @NotNull @FormParam("password") final String password) {
    try {
        String _password = EncryptUtil.encodeMD5(password);
        subject.login(new UsernamePasswordToken(username, _password, remember));
        return subject.getPrincipal() != null;
    } catch (UnknownAccountException e) {
        return false;
    }
}