开发者

Integration of separate JPA layer in multiple projects

开发者 https://www.devze.com 2023-02-14 19:18 出处:网络
I want to implement a separate JPA layer or service which can be use in multiple projects. 开发者_运维知识库Currently i am doing two projects one desktop and one Web based application using spring 3.0

I want to implement a separate JPA layer or service which can be use in multiple projects. 开发者_运维知识库Currently i am doing two projects one desktop and one Web based application using spring 3.0 framework. I want to create one JPA layer which can be used in both projects.Please suggest me how can integrate a single JPA project with two spring based projects?

Thanks, Sandeep


Build the Persistence (perhaps even including the service layer) into an jar and use that in the other projects as dependency. This would be the common way. How to manage the dependency and build the artefacts depends on the build enviroment you use (IDE, ant,maven,..).

The persistence(service) jar can include a spring config, which you can include into the spring config of the desktop and web applications.

Perhaps you can write a bit more on what you tried and what did not work?

0

精彩评论

暂无评论...
验证码 换一张
取 消