Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7537651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:54:33+00:00 2026-05-30T06:54:33+00:00

I am trying to use Apache Shiro with Spring MVC. The controllers we expose

  • 0

I am trying to use Apache Shiro with Spring MVC.

The controllers we expose (and want to secure) extend MultiActionController.
I have configured Apache Shiro for Spring the way they describe it here: http://shiro.apache.org/spring.html

I wanted to use @RequiresRoles annotation on my controller method, but it doesn’t work…

It doesn’t give any error in the logs, from what I have seen in debug it looks as if only handleRequest method from AbstractController (a superclass of MultiActionController) is checked for annotations.

The “internal” call from handleRequest to my annotated method is not invoked through proxy, so there is no check for Shiro annotations.

Can I somehow make the call to my method go through proxy despite the fact it’s a call to method of the same object as the caller?

Or is there any other solution to this problem?

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:54:35+00:00Added an answer on May 30, 2026 at 6:54 am

    You will need to configure AspectJ for compile-time or run-time weaving. This is the only way I know of in Spring to enforce annotations on instances that are not interface-based proxies.

    Shiro has an AspectJ sample project you can look at for ideas here: http://svn.apache.org/repos/asf/shiro/trunk/samples/aspectj/

    Also read about Spring’s AOP and AspectJ integration here: http://static.springsource.org/spring/docs/3.1.0.RELEASE/reference/html/aop.html#aop-using-aspectj

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use apache shiro into my project as I have to
I'm trying to use log4j my log4j.propreties: log4j.rootLogger=DEBUG, out log4j.logger.org.springframework=INFO log4j.logger.org.apache.activemq=INFO log4j.logger.org.apache.activemq.spring=WARN log4j.logger.org.apache.servicemix=DEBUG, stdout
I'm trying to use Apache Camel (with Spring XML) to check if a message
I'm trying to use Apache Lucene for tokenizing, and I am baffled at the
I am trying to use GLSMultipleLinearRegression (from apache commons-math package) for multiple linear regression.
I am trying to figure out how to use Apache Commons IO DirectoryWalker .
I'm trying to use the StringEscapeUtils.escapeXML() function from org.apache.commons.lang... There are two versions of
I'm trying to use VFS S3 a plugin for the Apache Commons VFS for
I'm trying to create a self signed certificate for use with Apache Tomcat 6.
I'm trying to use Apache Commons Net for FTP file transfers. Problem is files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.