Spring Boot 基于 Maven 的应用集成到 Spring MVC 基于 Gradle 的应用。

huangapple go评论59阅读模式
英文:

Spring boot Maven based App integration to spring mvc gradle based app

问题

我对所有人提出一个查询,我有两个应用程序,它们是独立运行的本地应用程序,我创建了一个Spring Boot应用程序,它充当中间层,在这个层中,我可以在其中一个应用程序中执行CRU(创建、读取、更新、搜索)操作。
例如:参考附图:
在这里输入图片描述

现在我想将这个中间层包含到应用程序1中,

虽然它是一个可行的解决方案,但我想要删除中间层。

有没有最佳实践可以这样做...

我已经创建了一个中间层,
现在,我想减少重新配置新服务的额外步骤。

英文:

I have query to all,
I have a 2 applications, these are on-prem applications working independent to each other,
I have create a spring boot application which act as a middle layer, with this layer I can perform CRU{Create, read, update, search} in one of the application.
EG: Image attached for ref:
enter image description here

Now i want to include this middle layer to Application 1,

Although, its a working solution, just i want to remove the middle layer.

Is there a best practice to do so...

I have create a middle layer,
Now, I want to reduce the extra steps to re-configure a new service

答案1

得分: 0

Maven或Gradle用于打包您的依赖JAR文件。如果您使用其中一个,都可以。

要删除中间层,我的方法将是删除第二层的代码并将其添加到第一层。
1)查找Maven依赖项并将其转换为等效的Gradle依赖项。
2)将第二层的代码复制并粘贴到第一层,包括所有单元测试用例,以确保功能不会更改。

第二种方法。
将中间层更改为第一个Gradle项目的子模块,但仍然需要将Maven依赖项更改为Gradle依赖项。

英文:

maven or gradle is for packaging your dependent JAR files. If you use either one that is fine.

For removing middle layer. My approach will be remove second layer code and add it to first layer.

  1. find maven dependancy and convert it to equivalent gradle dependancy.
  2. copy and paste code from second layer to first layer with all unit test cases. to make sure that functionality will not change.

Second Approach.
change middle layer to submodule of first gradle project. but still you need to change maven dependancy to gradle dependancy.

huangapple
  • 本文由 发表于 2023年2月8日 16:16:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/75382930.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定