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?
I was looking for a similar solution and found the answer from another question here. You should be using spring to make that work.
bean id="sessionFactory" class="com.foo.EntityScannerSessionFactoryBean">