简体   繁体   English

如何将 spring 引导应用程序集成到旧版 java 应用程序中并隔离它?

[英]how to integrate a spring boot application into a legacy java application and isolate it?

we have a very old java web application (about 15 years old,) with servlet.我们有一个非常古老的 java web 应用程序(大约 15 岁),带有 servlet。 Spring version 3 and.., technologies, I want to develop a rest API for this application, in order to be able to use modern technologies I decided to develop a new modern spring (boot) web application without an embedded server and bootstrap it using a new servlet that I will define in the legacy app web.xml . Spring version 3 and.., technologies, I want to develop a rest API for this application, in order to be able to use modern technologies I decided to develop a new modern spring (boot) web application without an embedded server and bootstrap it using我将在旧版应用程序web.xml中定义一个新的 servlet。 I also need to isolate dependencies using Java ClassLoader .我还需要使用 Java ClassLoader隔离依赖项。 it is obvious that the new app has dependencies inside the old one and I need to be able to inject them.很明显,新应用程序在旧应用程序中具有依赖项,我需要能够注入它们。 I know this is possible (OSGI frameworks use a very similar approach).我知道这是可能的(OSGI 框架使用非常相似的方法)。 but I have some questions.但我有一些问题。

first question(s): is this a correct/sensible strategy for this task?第一个问题:对于这项任务,这是一个正确/明智的策略吗? is there any better way?有没有更好的方法?

second question: where can I find some resources to study and learn in order to implement this strategy?第二个问题:我在哪里可以找到一些资源来学习和学习以实施这个战略?

I would personally look to update your Java code to use Spring boot and build new controllers, services and new views using Thymeleaf.我个人希望更新您的 Java 代码以使用 Spring 引导并使用 Thymeleaf 构建新的控制器、服务和新视图。 It may be a bit of upfront work, however, once you port your App to use Spring Boot, you will be able to manage it better.这可能是一些前期工作,但是,一旦您将您的应用程序移植到使用 Spring 引导,您将能够更好地管理它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将Spring Boot集成到旧版应用程序中 - Integrate Spring Boot in a legacy application 如何在没有Spring Boot和Springrest的情况下将Jersey集成到Spring 5 MVC应用程序中 - How to integrate Jersey into spring 5 mvc application without spring boot and springrest 将Spring Boot与现有的Spring应用程序集成 - Integrate Spring Boot with existing Spring application 旧版 web 应用程序(非 spring 启动应用程序)中的运行状况检查 [暂停] - Health check in legacy web application (non spring boot application) [on hold] 尝试设置旧版Java Spring引导应用程序时,导入com.fasterxml.jackson无法解决错误 - The import com.fasterxml.jackson cannot be resolved error on trying to setup a legacy Java Spring boot application 如何将密码传递给 java (Spring boot) 应用程序 - how to pass password to a java (Spring boot) application 在旧版应用程序中使用没有 Spring 引导的 Netflix 功能区 - Using Netflix Ribbon without Spring Boot in Legacy Application Spring Boot应用程序,如何将Java对象传递到应用程序中? - Spring Boot application, how to pass Java object into application? 重启 Java Spring 启动应用程序 - Restarting Java Spring Boot Application 在 spring 启动应用程序中集成 Spring AOP 作为 maven 依赖项 - Integrate Spring AOP as a maven dependency in a spring boot application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM