两个项目的共享库
我在同一个 tomcat 服务器上运行两个 web 应用程序(基于 Spring、JPA 和 JSF)。现在我的战争规模开始变大,我想改变这一点。对于开发,我使用嵌入式 jetty/tomcat 插件 - 也许这很有趣。
我想要实现的是: 创建一个 jar 来保存两个项目所需的类,例如 Spring、Hibernate 和 MySQL - 我想将它们构建为单独的 JAR 并将其部署在服务器上。我的下一个想法是将此捆绑包作为提供范围的依赖项提供给我的项目。这会缩小我的 WAR 文件。
我可以通过一种非常简单的方式实现这一目标吗?如果能使用嵌入式jetty/tomcat服务器进行开发那就太好了。
I'm running two webapps (based on Spring, JPA and JSF) on the same tomcat server. Now my WARs beginning to get big in size which I would like to change. For development I'm using the embedded jetty/tomcat plugin - maybe this is interesting.
What I want to achieve is: Creating a jar which holds the classes which are needed for both projects, e.g. Spring, Hibernate and MySQL
- I want to build those as a seperate JAR and deploy this on the server. My next thought was to provide this bundle to my projects as dependency with provided scope. That would shrink my WAR files.
Can I achieve this on a really simple way? It would be great if I could use the embedded jetty/tomcat server for development.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您或多或少是在问已经讨论过的内容 这里;只需添加您需要的依赖项即可。
I think your are more or less asking what has already been discussed here; just add the dependencies you need.