/**
* 登录提交
*
* @param userName
* @param password
* @param rememberMe
* @return
*/
@At
@POST
@Filters
public Result login(@Param("userName") String userName, @Param("password") String password, @Param("rememberMe") boolean rememberMe) {
Result result = shiroUserService.login(userName, password);
if (result.isSuccess()) {
User user = (User) result.getData().get("loginUser");
_putSession(SessionKeys.SESSION_USER_KEY, user);
if (rememberMe) {
_addCookie("brt_museum", DES.encrypt(userName + ":" + password, DefaultDESKey.getKey()), 2 * 7 * 24 * 3600);
}
}
return result;
}
这个可以正常取到参数
/**
* 登录提交
*
* @param userName
* @param password
* @param rememberMe
* @return
*/
@At
@POST
@Filters
public Result login(String userName, String password, boolean rememberMe) {
Result result = shiroUserService.login(userName, password);
if (result.isSuccess()) {
User user = (User) result.getData().get("loginUser");
_putSession(SessionKeys.SESSION_USER_KEY, user);
if (rememberMe) {
_addCookie("brt_museum", DES.encrypt(userName + ":" + password, DefaultDESKey.getKey()), 2 * 7 * 24 * 3600);
}
}
return result;
}
这样在某些时候就取不到参数了,一路null