[英]Migrate java web app to spring boot?
I am considering modifying an existing java web app (with web.xml and applicationContext.xml files and Spring 2.5) to use Spring Boot. 我正在考虑修改现有的Java Web应用程序(带有web.xml和applicationContext.xml文件以及Spring 2.5)以使用Spring Boot。 What are the implications of this process? 这个过程的含义是什么? I know I will need to create an @Configuration file to declare all of the beans (to eliminate the applicationContext.xml files), but would love some additional insight. 我知道我将需要创建一个@Configuration文件来声明所有bean(以消除applicationContext.xml文件),但是我希望获得一些更多的见解。 Any suggestions are appreciated! 任何建议表示赞赏!
Migration would take several steps. 迁移将需要几个步骤。 Some of them are:- 他们之中有一些是:-
You've to include all the dependencies required. 您必须包括所有必需的依赖项。 Some of the dependencies are:- 一些依赖项是:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
You could have some other dependencies too like Spring Security. 您可能还会有一些其他依赖项,例如Spring Security。 If your application uses Spring Security you have to provide java configuration for it. 如果您的应用程序使用Spring Security,则必须为其提供Java配置。 http://www.baeldung.com/spring-boot-security-autoconfiguration http://www.baeldung.com/spring-boot-security-autoconfiguration
https://spring.io/blog/2014/01/30/migrating-from-spring-framework-3-2-to-4-0-1 https://spring.io/blog/2014/01/30/migrating-from-spring-framework-3-2-to-4-0-1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.