java - Mapping all the classes in hibernate.cfg.xml with just one line? -


i'm bit lazy , i'm trying find single liner map classes in hibernate.cfg.config. (i'm using annotations not xml file)

what i've tried :

<mapping class="my_group.my_artifact.*"></mapping> 

can acheived using 1 line of code? i've looked other answers on didn't find lazy way fits me, , i'm new i'll appreciate helpful comment.

you can't using hibernate only.

you can use spring org.springframework.orm.hibernate5.localsessionfactorybean (package hibernate5 hibernate 5, change if need) or additional libraries described here:

hibernate config not list entities in xml


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -