栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

将Spring Boot集成到EAR项目中

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

将Spring Boot集成到EAR项目中

您必须使用依赖性管理系统。

它允许您将Spring Boot

WAR
模块项目的父项设置为与
spring-boot-starter-parent
。然后,可以像其他
WAR
项目
EAR
一样将项目包含到其中。

<dependencyManagement>     <dependencies>        <dependency> <!-- import dependency management from Spring Boot --> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>1.5.2.RELEASE</version> <type>pom</type> <scope>import</scope>        </dependency>    </dependencies></dependencyManagement>

…现在您可以按通常方式使用所有Spring Boot启动器依赖项:

<dependencies>    <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></dependencies>

您必须在模块项目级别指定启动程序依赖项,而依赖项管理配置可以在两个

EAR
项目中都指定-围绕整个项目或在每个项目中分别指定,具体取决于应用程序的要求。

在没有父POM的情况下使用Spring Boot



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/468807.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号