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

SEC-906: SecuredMethodDefinitionSource always requires AspectJ to be on the classpath #1159

Closed
spring-projects-issues opened this issue Jul 4, 2008 · 3 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

from SEC-906) said:

When setting up a SecuredMethodDefinitionSource based on AOP Alliance Java will throw a "java.lang.NoClassDefFoundError: org/aspectj/lang/Signature ". The reason is that SecuredMethodDefinitionSource extends AbstractFallbackMethodDefinitionSource which has compile time references to AOP alliance and aspectJ classes. Thus it currently is not possible to use @Secured without having AspectJ on the classpath.

AbstractFallbackMethodDefinitionSource as well as AbstractMethodDefinitionSource should delegate AspectJ related checkings to subclasses that are only loaded if it is dynamically determined whether AspectJ is on the classpath or not.

Right now I helped myself by patching the class and simply commenting out all JoinPoint and Signature class references.

@spring-projects-issues
Copy link
Author

Luke Taylor said:

This dependency has been in there since Acegi’s AspectJSecurityInterceptor was written so this isn’t anything new and so a decision can be postponed till 2.1. Any changes to check with classloaders etc will just make the code harder to follow and the aspectj runtime jar is only about 100k in size in any case.

@spring-projects-issues
Copy link
Author

Luke Taylor said:

I don’t think this justifies making changes to core code to locate classes reflectively etc. It just makes for a maintenance headache and aspectj is likely to feature even more strongly in future releases.

@spring-projects-issues
Copy link
Author

Dan Diephouse said:

This dependency wasn’t in Acegi 1.0.6. We performed a straightforward upgrade of our app and this is the first time we had to add the dependency.

@spring-projects-issues spring-projects-issues added Closed type: enhancement A general enhancement status: declined A suggestion or change that we don't feel we should currently apply type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 3.0.0 M1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

1 participant