Results 1 to 3 of 3

Thread: about Method Security Expressions in controller

  1. #1
    Join Date
    Oct 2008
    Posts
    23

    Default about Method Security Expressions in controller

    Hi guys,

    i planned to use spring security in my spring application. i have tried the method security expression authorization in service object method and DAO object method, it works fine. But it is not working in controller method. so may i know whether the method security expression can be use in controller method? or i need to make some changes on my configuration file?

    any reply will be deeply appreciate, thanks

  2. #2
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    Typically, you will have trouble annotating concrete classes and are better off in almost all cases annotating interfaces instead. Since most [Spring MVC] controllers are concrete classes, you may find that you have trouble getting this to work. You're welcome to try and report back your experience, though!
    Peter Mularien | Blog
    Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
    SCJP 5, Oracle DBA
    Any postings are my own opinion, and should not be attributed to my employer or clients.


  3. #3
    Join Date
    Oct 2008
    Posts
    23

    Default

    Hi, thank you very much for you reply.

    actually i did try out for annotating controller, it does not work. but it is working fine in service interface and service implementation.

    the reason i tried to annotate controller to control the use of the method in controller instead of service class is because the method inside the my service method is shared with other modules, so if i perform authorization check inside the service method, it will affect other module that using that service method.

    so do you have any suggestion for me?

    Thanks in advance...............

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •