Is there a way to get all @Entity classes in Spring? I can't seem to find any solution. Thanks.
answer:
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.5</version>
</dependency>
will do this easily ;)
Why do you need this? I suppose you are in a JPA context, then you can do it like this:
entityManager.getMetamodel().getEntities();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With