NutzCN Logo
问答 为什么会报404,找不到这个方法
发布于 2137天前 作者 fabienfay 1977 次浏览 复制 上一个帖子 下一个帖子
标签:

@At("/user")
@IocBean
@Ok("json")
public class UserController {


```

@At
@POST
public int inviteFlock(@Param("uid") int uid,@Param("fid") int fid){
userDao.deleteUser(fid,uid);
return userDao.inviteFlock(uid,fid);

}


``` $.post('${base!}/user/inviteFlock',{'uid': uid, 'fid': group_id},function (data) {
3 回复

用插入代码按钮重新贴一下代码

@At("/user")
@IocBean
@Ok("json")
public class UserController {
@Inject(value="userDao")
private UserDao userDao;

@Inject
private Dao dao;

@Inject
private ChatMessageDao chatMessageDao;


@At
@POST
public int inviteFlock(@Param("uid") int uid,@Param("fid") int  fid){
    userDao.deleteUser(fid,uid);
    return userDao.inviteFlock(uid,fid);

}

Request URL: http://localhost:8081/user/inviteFlock
Request Method: POST
Status Code: 404 Not Found
Remote Address: [::1]:8081
Referrer Policy: no-referrer-when-downgrade
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 333
Content-Type: text/html;charset=iso-8859-1
Date: Mon, 07 Jan 2019 07:28:11 GMT
Server: Jetty(9.4.11.v20180605)
X-Powered-By: nutz/1.r.67-SNAPSHOT <nutzam.com>
Accept: /
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,zh-TW;q=0.8
Connection: keep-alive
Content-Length: 11
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: sid=ee22c332-b16a-43ee-b7a4-60e26cdf0cd9
Host: localhost:8081
Origin: http://localhost:8081
Referer: http://localhost:8081/find.html
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
X-Requested-With: XMLHttpRequest
uid: 2
fid: 6

添加回复
请先登陆
回到顶部