So I have a standalone application and a web application to do, but the persistance classes that I’ve created in the standalone gonna be used in the web application too.
Since my standalone project have the hibernate.cfg.xml and the hbm.xml for each persistance class, how can I export this project like in a JAR and just import in the web application project and use the classes easily?
So I have a standalone application and a web application to do, but the
Share
Use maven to create a jar containing persistence classes and *.hbm.xml files. In your webapp you can use this jar as a dependency and use the hbm files to configure your session factory bean.