I have some web-project (Spring MVC + Hibernate). For hibernate objects I am using an annotations. For specific purpose I need to create a console application that should use the same objects as web-project. So I need to redefine it in a console application project.
I thought to create an axternal library (jar file) with hibernate objects and connect that library to each project that need it.
Is this a good solution? Is there some problem with hibernate objects in this solution? May be there are different solutions?
Thank you
I have some web-project (Spring MVC + Hibernate). For hibernate objects I am using
Share
So , both the console application and web-project uses the same Database ? If yes , it is a good solution as it allows code reuse .
If both applications have their own hibernate entities , you have to update the entities in both applications if there are any update. If you make the hibernate entities as an library , you only need to update the library once .