发现 pom.xml 并没有细分第三方库的版本啊,不知道怎么升级 spring core 版本。。
<project xmlns="<a href=" http:="" maven.apache.org="" POM="" 4.0.0"="" rel="nofollow">http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion>
<groupId>org.springframework.data.examples</groupId>
<artifactId>spring-data-examples</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Data - Examples</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<modules>
<module>bom</module>
<module>cassandra</module>
<module>couchbase</module>
<module>elasticsearch</module>
<module>jdbc</module>
<module>jpa</module>
<module>ldap</module>
<module>map</module>
<module>mongodb</module>
<module>multi-store</module>
<module>neo4j</module>
<module>rest</module>
<module>redis</module>
<module>solr</module>
<module>web</module>
</modules>
<properties>
<apt.version>1.1.3</apt.version>
</properties>
<profiles>
<profile>
<id>spring-data-next</id>
<properties>
<spring-data-releasetrain.version>Kay-BUILD-SNAPSHOT</spring-data-releasetrain.version>
</properties>
</profile>
<profile>
<id>spring-data-next-releasetrain</id>
<properties>
<spring-data-releasetrain.version>Lovelace-BUILD-SNAPSHOT</spring-data-releasetrain.version>
</properties>
</profile>
<profile>
<id>spring-data-next-releasetrain-released</id>
<properties>
<spring-data-releasetrain.version>Lovelace-M1</spring-data-releasetrain.version>
</properties>
</profile>
</profiles>
<developers>
<developer>
<id>ogierke</id>
<name>Oliver Gierke</name>
<email>[email protected]</email>
</developer>
<developer>
<id>tdarimont</id>
<name>Thomas Darimont</name>
<email>[email protected]</email>
</developer>
<developer>
<id>cstrobl</id>
<name>Christoph Strobl</name>
<email>[email protected]</email>
</developer>
<developer>
<id>gturnquist</id>
<name>Greg Turnquist</name>
<email>[email protected]</email>
</developer>
<developer>
<id>mpaluch</id>
<name>Mark Paluch</name>
<email>[email protected]</email>
</developer>
<developer>
<id>jschauder</id>
<name>Jens Schauder</name>
<email>[email protected]</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>provided</scope>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-libs-snapshot</id>
<url>https://repo.spring.io/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-libs-snapshot</id>
<url>https://repo.spring.io/libs-snapshot</url>
</pluginRepository>
</pluginRepositories>
</project>
这是默认的 pom.xml
然后 spring 的版本是 5.0.4
我现在想升级到 spring 5.0.5,要怎么做?
1
honeycomb 2018-04-14 18:09:00 +08:00 via Android
这里的版本号是由 springboot starter 的各个包管理的(包括 springboot parent )
可以 override,即手动指定某个 artifact 的版本号。 |
2
CFO 2018-04-14 18:09:49 +08:00 via Android
parent 里面有大部分的
|
3
acrisliu 2018-04-14 19:31:25 +08:00
加入 spring-core 5.0.5 的 dependency 就行。
不过建议除非有重大 BUG,否则还是由 spring boot parent 统一管理依赖版本。 |