Hibernate configuration - session factory scanning?

前端 未结 5 1052
粉色の甜心
粉色の甜心 2020-12-22 01:06

We have this hibernate.cfg.xml file. Is there a way to tell Hibernate to just scan a directory instead of having to add an entry here for each class?



        
5条回答
  •  旧时难觅i
    2020-12-22 01:28

    To get the discovery mechanism, you need to use Hibernate EntityManager which implements the Java Persistence standard discovery mechanism. Otherwise you need to list your classes.

提交回复
热议问题