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
Support Class meta-annotation attributes with ASM-based annotation processing [SPR-11557] #16181
Comments
Sam Brannen commented Sérgio Silva, I attempted to reproduce the issue you describe; however, I was unsuccessful. Please take a look at the unit and integration tests that I checked in with GitHub commit f1fbe85 and let me know if that adequately represents the configuration you are using. If you are still experiencing the Can you also please confirm that you experience this issue against Spring Framework 4.0.2? Thanks in advance for feedback! Sam |
Sérgio Silva commented Updated stacktrace. I can confirm it is 4.0.2. I will try to add an example test/project soon. |
Sam Brannen commented Sérgio Silva, thanks for updating the stacktrace and confirming that this is against 4.0.2. Based on your stacktrace, it is apparent that there is a problem; however, I have yet to come up with a test case that reproduces this. So, an example/test project would be very useful! Please provide a test project or at least an example of the class hierarchy and exact annotations (including meta- and meta-meta-annotations) that you're using. The sooner you can do this, the better... since we plan to release Spring Framework 4.0.3 before the end of March. We also need to know how you are bootstrapping the application context. It appears that you're experiencing the problem as the Thanks in advance! Sam |
Sérgio Silva commented I tried to reproduce it based on your tests and also with the issues war-java project but unsuccessfully. I think this something specific with my setup since we have a multi-jar scenario, I will try to send you a setup where this is reproducible till midnight. |
Sam Brannen commented
I think it has something to do with how your application classes are loaded (e.g., a combination of JARs) and whether or not Spring has to use ASM or reflection to inspect the annotations on your classes. Thus your specific setup is likely required to reproduce this.
Thanks! |
Sérgio Silva commented Here it is, sorry for the delay :p https://github.com/sergiofbsilva/spr11557/blob/master/README.md |
Sam Brannen commented Sérgio Silva, thanks for supplying us the example project! That certainly helps. I am working on a solution and will keep you posted. Regards, Sam |
Sam Brannen commented Fixed as described in the comments for GitHub commit 9ce0df8:
|
Sam Brannen commented I have some good news and some bad news for you. As you can see above, I have resolved this issue as Fixed. However, the scope is limited. With the fix in place (available in the next snapshot build for Spring Framework 4.0.3), you should now be able to use Thus, you will likely want to add yourself as as watcher for #16198. Regards, Sam |
Sérgio Silva commented Thanks for the feedback. I will wait for the fix! |
Sam Brannen commented Sérgio Silva, I just deployed your example application to Tomcat 7 against a local 4.0.3 snapshot for Spring that contains the fix for this issue and #16198, and when I access http://localhost:8080/xpto/spaces, I now see the following in the browser:
So it appears that your problem has been solved. Please test against the next Thanks, Sam |
Sérgio Silva commented Working as expected with 4.0.3-RELEASE |
Sam Brannen commented Great! Thanks for confirming. |
Sérgio Silva opened SPR-11557 and commented
I'm trying to create a composed annotation which uses
@Configuration
and@ComponentScan
as meta-annotations.The problem appears in
ConfigurationClassPostProcessor
:The meta-annotation is being processed with
classValuesAsString
set totrue
which breaks the look-up for Class Type. See AnnotationAttributesReadingVisitor for details.Affects: 4.0.2
Issue Links:
Referenced from: commits 9ce0df8, e7b8a65, f1fbe85
The text was updated successfully, but these errors were encountered: