I am trying to create and load dynamically in my application. There are comments on a member field of the class ("id"). Now I can easily compile and load class. I can see the compiled class in the directory, and when I open it in eclipse, then I can see the member field has annotations. But when I try to read this annotation, using the field getAnnotations (), the following are the things:
1) When I run the stand alone application, then I get the annotation " Key " / P>
2) When I run an application on the Tomcat server, GetAnnotations () returns the merit list empty. There is no "key" annotation.
Just note that I have a retention policy. How can I get annotations when I run it on the server? What are the possible things to solve this issue?
PS: Some code
@ override public class
// class loader
private class
No comments:
Post a Comment