AJAX代码:
function login(){
$.ajax({
url: "test",
type: "post",
dataType: "json",
contentType: "application/json",
data: JSON.stringify({
username: $("#username").val(),
password: $("#password").val()
}),
success: function(data){
此处省略
});
}
----------------------------------------------------------------------
后台代码:
/**
* 登录
* @param user 用户实体,包含用户名、密码属性
* @return
*/
@At("/login")
@POST
public Map<String,Object> login(User user, HttpServletRequest request){
return securityLogic.login(request, user);
}
-------------------------------------------------------------------------
控制台输出消息:
2015-10-20 16:48:30,667 DEBUG [http-bio-8080-exec-10] [org.nutz.mvc.impl.UrlMappingImpl] Search mapping for path=/login : NOT Action match
有没有大神帮忙看下,感激不尽