I have the current configuration:
我有当前的配置:
- a GUI team develops the Angular app in a separate project and builds all TypeScript stuff to produce the final UI app.
- another team has Vert.x java library in the server app to do REST service and produces a final fat jar.
GUI团队在单独的项目中开发Angular应用程序,并构建所有TypeScript内容以生成最终的UI应用程序。
另一个团队在服务器应用程序中使用Vert.x java库来执行REST服务并生成最终的胖罐。
I wonder what's the best approach to deliver GUI and backend in one shot:
我想知道一次性提供GUI和后端的最佳方法是什么:
Is is ok to have 1 jar for backend and Gui (say a directory call "app") both in the same folder? Can vert.x access resources outside its jar?
可以在同一文件夹中为后端和Gui(例如目录调用“app”)设置1个jar吗? vert.x可以访问其jar外的资源吗?
Do I have to put GUI in the same maven project where my vert.x REST services are developped, run the "ng build" commands from maven, and package all in one jar?
我是否必须将GUI放在我的vert.x REST服务开发的同一个maven项目中,从maven运行“ng build”命令,并将所有命令打包在一个jar中?
I'm a bit confused here.
我在这里有点困惑。
Any of you are in the same situation, what's your advice on this?
你们中的任何人都处于同样的境地,你对此有何建议?
Thanks
1 个解决方案
#1
1
All it's upto you how do you wanna deploy it on production ;)
这一切都取决于你如何在生产中部署它;)
First approach
You can create one fat.jar to deliver everything in it -> so it will include angular static build files (under webroot) and then all your vert.x related code.
您可以创建一个fat.jar来提供其中的所有内容 - >因此它将包括角度静态构建文件(在webroot下),然后包含所有与vert.x相关的代码。
Second approach
You can create one fat.jar just with angular static files exposed using vert.x and also you can integrate authentication (cas/saml) in the same and another fat.jar will have rest implementation (connecting to database or WebService consumption ). So you will have two fat.jar and it will be best if you are planning for clustering and for hazel cast structure.
您可以使用vert.x公开的角度静态文件创建一个fat.jar,并且您可以将身份验证(cas / saml)集成到另一个中,另一个fat.jar将具有rest实现(连接到数据库或WebService使用)。所以你将有两个fat.jar,如果你计划聚类和榛子铸造结构,那将是最好的。
We have already tested both approaches and both are working great but Right now we are following second approach !!
我们已经测试了两种方法,两者都运行良好,但现在我们正在采用第二种方法!
#1
1
All it's upto you how do you wanna deploy it on production ;)
这一切都取决于你如何在生产中部署它;)
First approach
You can create one fat.jar to deliver everything in it -> so it will include angular static build files (under webroot) and then all your vert.x related code.
您可以创建一个fat.jar来提供其中的所有内容 - >因此它将包括角度静态构建文件(在webroot下),然后包含所有与vert.x相关的代码。
Second approach
You can create one fat.jar just with angular static files exposed using vert.x and also you can integrate authentication (cas/saml) in the same and another fat.jar will have rest implementation (connecting to database or WebService consumption ). So you will have two fat.jar and it will be best if you are planning for clustering and for hazel cast structure.
您可以使用vert.x公开的角度静态文件创建一个fat.jar,并且您可以将身份验证(cas / saml)集成到另一个中,另一个fat.jar将具有rest实现(连接到数据库或WebService使用)。所以你将有两个fat.jar,如果你计划聚类和榛子铸造结构,那将是最好的。
We have already tested both approaches and both are working great but Right now we are following second approach !!
我们已经测试了两种方法,两者都运行良好,但现在我们正在采用第二种方法!