Reputation: 2003
Question: I want to separate the JPA entities from the actual Java code.
Reason: I am developing a Java application using the spring and hibernate frameworks. I am using more than 400 entities, which increases the running time of Tomcat server during application development.
What I have done: To resolve this problem I have created the .class files of our entity classes, created the jar files of these, and imported the jar files into the application, which is not working in the application.
Is it possible to deploy the entities to some other server and use into another server where all other code is running? If yes then how?
Please refer to any Java project architecture which resolves the above issue.
Upvotes: 0
Views: 694
Reputation: 5070
Why not just define them in a separate Maven project, and refer to that project as a dependency in your app? That way you only compile the entities when a change is made to that project.
Upvotes: 1