is there any way to define objects in hibernate.cfg.xml by scope and not one by one?
For example, in Spring you can define all controllers by such annotation:
<context:component-scan base-package="crm.controller" />
Can I define hibernate classes in the same way? Or it must be defined one by one?
Thank you
If you are using Spring MVC, you can configure it when setting up your sessionFactory. If you are using hbm files:
If you are using annotated classes: