0

Controller with annotation @RolesAllowed can't work

asked 2013-09-02 07:10:36 +0800

archy123 gravatar image archy123
1 1

updated 2013-09-04 06:09:54 +0800

like this:

@Controller
@RequestMapping(value = "/login")
public class Test extends SelectorComposer<Component> {

@Listen("onClick = #searchButton")
public void search() {
        String keyword = keywordBox.getValue();
        Messagebox.show("keyword:" + keyword);
}
//work,spring mvc  component scan can find the class

@Controller
@RequestMapping(value = "/login")
public class Test extends SelectorComposer<Component> {

@Listen("onClick = #searchButton")
@RolesAllowed({"ROLE_USER"})
public void search() {
        String keyword = keywordBox.getValue();
        Messagebox.show("keyword:" + keyword);
}
//don't work,component scan can't find the class,when request /login/x..got a 404 error
delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2013-09-02 07:10:36 +0800

Seen: 2 times

Last updated: Sep 04 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More