在Maven上从后台拆分前端 [英] Spliting Front-end from Back-office on Maven
问题描述
我有一个基于Java电子商务网络的应用程序. 它是使用Spring Roo编写的,因此遵循域驱动设计"范式. 该应用程序具有两个UI. 第一个是前端,基于纯jsp/jstl/tiles,它稳定,很少更改并且必须保持运行. 第二个是基于Vaadin/GWT构建的,它经常更改(根据Custemer的要求).
I've a java ecommerce web-based app. It is written using Spring Roo, so it follows the Domain Driven Design paradigm. The application has two UI. The first is front-end, based on plain jsp/jstl/tiles, it is stable, changes rarely and HAVE to STAY UP and RUNNING. The second is built on Vaadin/GWT, it changes frequently (on Custemer requerements).
我的问题是如何最好地构建Maven项目,例如:
My question is how to best structure Maven project such as:
- 仅允许在后端或前端UI部署(在tomcat上);
- 请勿复制域逻辑
谢谢
推荐答案
将域对象拆分为与gui代码不同的库.
Split the domain objects out into a different library from the gui code.
然后根据该库有2次单独的战争.
Then have 2 seperate wars both depending on this library.
这是一个非常标准的模式.
This is a very standard pattern.
这篇关于在Maven上从后台拆分前端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!