首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > java类路径扫描。

java类路径扫描。

资 源 简 介

Class Search allows for easy scanning of the classpath to find classes that match some specified criteria. Class Search was initially put together to prevent having to not only annotate entity classes but also list each one in a Spring configuration file. To allow you to only have to annotate the classes Class Search was written to find the annotated classes at runtime and provide them to the Hibernate SessionFactory. Class Search is not just limited to use with Spring and Hibernate however currently it only has functionality to check class-level annotations when trying to locate classes. If you would like other criteria added (like checking interfaces etc.) then add an issue. An example of using Class Search to locate all classes in the "com.superafroman" package (and sub-packages) that are annotated with @Entity follows. ``` ClassScanner scanner = new ClassScanner(); scanner.addClassLocater(new ClasspathClassLocater()); scanner.a
VIP VIP
0.185734s