I have a plain jane servlets web application, and some of my classes have the following annotations:
@Controller
@RequestMapping(name = \"/blog/\")
public cl
Try corn-cps
List<Class<?>> classes = CPScanner.scanClasses(new PackageNameFilter("net.sf.corn.cps.*"),new ClassFilter().appendAnnotation(Controller.class));
for(Class<?> clazz: classes){
if(clazz.isAnnotationPresent(RequestMapping.class){
//This is what you want
}
}
Maven module dependency :
<dependency>
<groupId>net.sf.corn</groupId>
<artifactId>corn-cps</artifactId>
<version>1.0.1</version>
</dependency>
visit the site https://sites.google.com/site/javacornproject/corn-cps for more information