首页 > 解决方案 > 为什么 spring-boot-starter-parent 1.4.7 之后没有 Velocity?

问题描述

我需要将我的 spring-boot-starter-parent 从 1.4.2 升级到最新版本:

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.5.RELEASE</version>
    </parent>

但这将不再起作用:

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-velocity</artifactId>
        </dependency>

发现1.4.7之后,velocity包不再包含在parent中。如何处理?升级依赖项后,我可以暂停“速度”依赖项吗?

标签: springspring-boot

解决方案


Spring Boot 2.0 依赖于 Spring Framework 5.0。这放弃了对 Velocity 的支持。因此在 Spring Boot 2 中不再支持 Velocity。

Dropped support: Portlet, Velocity, JasperReports, XMLBeans, JDO, Guava.

如果您真的需要 Velocity,建议:如果需要,请继续使用 Spring Framework 4.3.x。

请阅读什么是新的 Spring Framework 5.x

删除的包、类和方法

Package beans.factory.access (BeanFactoryLocator mechanism).
Package jdbc.support.nativejdbc (NativeJdbcExtractor mechanism).
Package mock.staticmock removed from spring-aspects module.
No support for AnnotationDrivenStaticEntityMockingControl anymore.
Packages web.view.tiles2 and orm.hibernate3/hibernate4 dropped.
Minimum requirement: Tiles 3 and Hibernate 5 now.
Dropped support: Portlet, Velocity, JasperReports, XMLBeans, JDO, Guava.
Recommendation: Stay on Spring Framework 4.3.x for those if needed.
Many deprecated classes and methods removed across the codebase.
A few compromises made for commonly used methods in the ecosystem.

推荐阅读