Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通配符*与@Param不兼容 #361

Closed
juqkai opened this issue Dec 18, 2012 · 3 comments
Closed

通配符*与@Param不兼容 #361

juqkai opened this issue Dec 18, 2012 · 3 comments

Comments

@juqkai
Copy link
Member

@juqkai juqkai commented Dec 18, 2012

通配符*与@param不兼容

@at("/list/*")
public Map<String, Object> list(Long codeId, @param("pageNo")Integer page)

使用了通配符*与@param(""), 如果路径上的参数大于1那么, 会把page给注入进去, 我觉得应该排除带有Param的参数.

@wendal
Copy link
Member

@wendal wendal commented Dec 18, 2012

No, 路径参数最优先.

@wendal wendal closed this Dec 18, 2012
@juqkai
Copy link
Member Author

@juqkai juqkai commented Dec 18, 2012

但是有很多参数是不能放在路径参数里面的, 如果出现乱添加路径的话, 会存在一定的问题

@zozoh
Copy link
Member

@zozoh zozoh commented Dec 18, 2012

如果仅仅一个,那么你应该试试

 @At("/list/?")
 public Map list(Long codeId, @Param("pageNo")Integer page)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.