我们知道SpringBoot能通过启动器(starters)来自动帮助我们管理maven依赖,但是里面不同的maven坐标都有不同的版本,不仅如此,还需要考虑许多maven依赖坐标之间会不会有冲突,这就需要协调好各个版本之间的关系了。
这些SpringBoot都帮我们管理好了。
它是在哪儿管理的呢?
<parent>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-parentartifactId>
<version>2.2.5.RELEASEversion>
<relativePath/>
parent>
我们通过Spring Initializr生成一个项目时,会在pom文件中自动帮我们加入这个parent
元素,说明咱们的SpringBoot依赖于某个父项目,我们点进去一看究竟
<parent>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-dependenciesartifactId>
<version>2.2.5.RELEASEversion>
<relativePath>../../spring-boot-dependenciesrelativePath>
parent>
里面有个重要的元素,它还依赖个父项目(禁止俄罗斯套娃 ),咱们再点进去看看
结果发现一个properties
元素,里面定义了很多maven坐标的版本。
<properties>
<activemq.version>5.15.11activemq.version>
<antlr2.version>2.7.7antlr2.version>
<appengine-sdk.version>1.9.78appengine-sdk.version>
<artemis.version>2.10.1artemis.version>
<aspectj.version>1.9.5aspectj.version>
<assertj.version>3.13.2assertj.version>
<atomikos.version>4.0.6atomikos.version>
<awaitility.version>4.0.2awaitility.version>
<bitronix.version>2.1.4bitronix.version>
<build-helper-maven-plugin.version>3.0.0build-helper-maven-plugin.version>
<byte-buddy.version>1.10.8byte-buddy.version>
<caffeine.version>2.8.1caffeine.version>
<cassandra-driver.version>3.7.2cassandra-driver.version>
<classmate.version>1.5.1classmate.version>
<commons-codec.version>1.13commons-codec.version>
<commons-dbcp2.version>2.7.0commons-dbcp2.version>
<commons-lang3.version>3.9commons-lang3.version>
<commons-pool.version>1.6commons-pool.version>
<commons-pool2.version>2.7.0commons-pool2.version>
<couchbase-cache-client.version>2.1.0couchbase-cache-client.version>
<couchbase-client.version>2.7.12couchbase-client.version>
<db2-jdbc.version>11.5.0.0db2-jdbc.version>
<dependency-management-plugin.version>1.0.9.RELEASEdependency-management-plugin.version>
<derby.version>10.14.2.0derby.version>
<dropwizard-metrics.version>4.1.3dropwizard-metrics.version>
<ehcache.version>2.10.6ehcache.version>
<ehcache3.version>3.8.1ehcache3.version>
<elasticsearch.version>6.8.6elasticsearch.version>
<embedded-mongo.version>2.2.0embedded-mongo.version>
<exec-maven-plugin.version>1.6.0exec-maven-plugin.version>
<flatten-maven-plugin.version>1.1.0flatten-maven-plugin.version>
<flyway.version>6.0.8flyway.version>
<freemarker.version>2.3.29freemarker.version>
<git-commit-id-plugin.version>3.0.1git-commit-id-plugin.version>
<glassfish-el.version>3.0.3glassfish-el.version>
<glassfish-jaxb.version>2.3.2glassfish-jaxb.version>
<groovy.version>2.5.9groovy.version>
<gson.version>2.8.6gson.version>
<h2.version>1.4.200h2.version>
<hamcrest.version>2.1hamcrest.version>
<hazelcast.version>3.12.6hazelcast.version>
<hazelcast-hibernate5.version>1.3.2hazelcast-hibernate5.version>
<hibernate.version>5.4.12.Finalhibernate.version>
<hibernate-validator.version>6.0.18.Finalhibernate-validator.version>
<hikaricp.version>3.4.2hikaricp.version>
<hsqldb.version>2.5.0hsqldb.version>
<htmlunit.version>2.36.0htmlunit.version>
<httpasyncclient.version>4.1.4httpasyncclient.version>
<httpclient.version>4.5.11httpclient.version>
<httpcore.version>4.4.13httpcore.version>
<infinispan.version>9.4.18.Finalinfinispan.version>
<influxdb-java.version>2.15influxdb-java.version>
<jackson.version>2.10.2.20200130jackson.version>
<jackson-bom.version>${jackson.version}jackson-bom.version>
<jakarta-activation.version>1.2.2jakarta-activation.version>
<jakarta-annotation.version>1.3.5jakarta-annotation.version>
<jakarta-jms.version>2.0.3jakarta-jms.version>
<jakarta-json.version>1.1.6jakarta-json.version>
<jakarta-json-bind.version>1.0.2jakarta-json-bind.version>
<jakarta-mail.version>1.6.4jakarta-mail.version>
<jakarta-persistence.version>2.2.3jakarta-persistence.version>
<jakarta-servlet.version>4.0.3jakarta-servlet.version>
<jakarta-servlet-jsp.version>2.3.5jakarta-servlet-jsp.version>
<jakarta-servlet-jsp-jstl.version>1.2.7jakarta-servlet-jsp-jstl.version>
<jakarta-transaction.version>1.3.3jakarta-transaction.version>
<jakarta-validation.version>2.0.2jakarta-validation.version>
<jakarta-websocket.version>1.1.2jakarta-websocket.version>
<jakarta-ws-rs.version>2.1.6jakarta-ws-rs.version>
<jakarta-xml-bind.version>2.3.2jakarta-xml-bind.version>
<jakarta-xml-ws.version>2.3.2jakarta-xml-ws.version>
<janino.version>3.1.0janino.version>
<javax-activation.version>1.2.0javax-activation.version>
<javax-annotation.version>1.3.2javax-annotation.version>
<javax-cache.version>1.1.1javax-cache.version>
<javax-jaxb.version>2.3.1javax-jaxb.version>
<javax-jaxws.version>2.3.1javax-jaxws.version>
<javax-jms.version>2.0.1javax-jms.version>
<javax-json.version>1.1.4javax-json.version>
<javax-jsonb.version>1.0javax-jsonb.version>
<javax-mail.version>1.6.2javax-mail.version>
<javax-money.version>1.0.3javax-money.version>
<javax-persistence.version>2.2javax-persistence.version>
<javax-transaction.version>1.3javax-transaction.version>
<javax-validation.version>2.0.1.Finaljavax-validation.version>
<javax-websocket.version>1.1javax-websocket.version>
<jaxen.version>1.2.0jaxen.version>
<jaybird.version>3.0.8jaybird.version>
<jboss-logging.version>3.4.1.Finaljboss-logging.version>
<jboss-transaction-spi.version>7.6.0.Finaljboss-transaction-spi.version>
<jdom2.version>2.0.6jdom2.version>
<jedis.version>3.1.0jedis.version>
<jersey.version>2.29.1jersey.version>
<jest.version>6.3.1jest.version>
<jetty.version>9.4.26.v20200117jetty.version>
<jetty-el.version>8.5.49jetty-el.version>
<jetty-jsp.version>2.2.0.v201112011158jetty-jsp.version>
<jetty-reactive-httpclient.version>1.0.3jetty-reactive-httpclient.version>
<jmustache.version>1.15jmustache.version>
<jna.version>4.5.2jna.version>
<joda-time.version>2.10.5joda-time.version>
<johnzon.version>${johnzon-jsonb.version}johnzon.version>
<johnzon-jsonb.version>1.2.3johnzon-jsonb.version>
<jolokia.version>1.6.2jolokia.version>
<jooq.version>3.12.4jooq.version>
<jsonassert.version>1.5.0jsonassert.version>
<json-path.version>2.4.0json-path.version>
<jstl.version>1.2jstl.version>
<jtds.version>1.3.1jtds.version>
<junit.version>4.12junit.version>
<junit-jupiter.version>5.5.2junit-jupiter.version>
<kafka.version>2.3.1kafka.version>
<kotlin.version>1.3.61kotlin.version>
<kotlin-coroutines.version>1.3.3kotlin-coroutines.version>
<lettuce.version>5.2.2.RELEASElettuce.version>
<liquibase.version>3.8.7liquibase.version>
<log4j2.version>2.12.1log4j2.version>
<logback.version>1.2.3logback.version>
<lombok.version>1.18.12lombok.version>
<mariadb.version>2.4.4mariadb.version>
<maven-antrun-plugin.version>1.8maven-antrun-plugin.version>
<maven-assembly-plugin.version>3.1.1maven-assembly-plugin.version>
<maven-clean-plugin.version>3.1.0maven-clean-plugin.version>
<maven-compiler-plugin.version>3.8.1maven-compiler-plugin.version>
<maven-dependency-plugin.version>3.1.1maven-dependency-plugin.version>
<maven-deploy-plugin.version>2.8.2maven-deploy-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M3maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>2.22.2maven-failsafe-plugin.version>
<maven-help-plugin.version>3.2.0maven-help-plugin.version>
<maven-install-plugin.version>2.5.2maven-install-plugin.version>
<maven-invoker-plugin.version>3.2.1maven-invoker-plugin.version>
<maven-jar-plugin.version>3.1.2maven-jar-plugin.version>
<maven-javadoc-plugin.version>3.1.1maven-javadoc-plugin.version>
<maven-resources-plugin.version>3.1.0maven-resources-plugin.version>
<maven-shade-plugin.version>3.2.2maven-shade-plugin.version>
<maven-site-plugin.version>3.8.2maven-site-plugin.version>
<maven-source-plugin.version>3.1.0maven-source-plugin.version>
<maven-surefire-plugin.version>2.22.2maven-surefire-plugin.version>
<maven-war-plugin.version>3.2.3maven-war-plugin.version>
<micrometer.version>1.3.5micrometer.version>
<mimepull.version>1.9.12mimepull.version>
<mockito.version>3.1.0mockito.version>
<mongodb.version>3.11.2mongodb.version>
<mongo-driver-reactivestreams.version>1.12.0mongo-driver-reactivestreams.version>
<mssql-jdbc.version>7.4.1.jre8mssql-jdbc.version>
<mysql.version>8.0.19mysql.version>
<nekohtml.version>1.9.22nekohtml.version>
<neo4j-ogm.version>3.2.9neo4j-ogm.version>
<netty.version>4.1.45.Finalnetty.version>
<netty-tcnative.version>2.0.29.Finalnetty-tcnative.version>
<nio-multipart-parser.version>1.1.0nio-multipart-parser.version>
<ojdbc.version>19.3.0.0ojdbc.version>
<okhttp3.version>3.14.7okhttp3.version>
<pooled-jms.version>1.0.6pooled-jms.version>
<postgresql.version>42.2.10postgresql.version>
<prometheus-pushgateway.version>0.7.0prometheus-pushgateway.version>
<quartz.version>2.3.2quartz.version>
<querydsl.version>4.2.2querydsl.version>
<rabbit-amqp-client.version>5.7.3rabbit-amqp-client.version>
<reactive-streams.version>1.0.3reactive-streams.version>
<reactor-bom.version>Dysprosium-SR5reactor-bom.version>
<rest-assured.version>3.3.0rest-assured.version>
<rsocket.version>1.0.0-RC6rsocket.version>
<rxjava.version>1.3.8rxjava.version>
<rxjava2.version>2.2.18rxjava2.version>
<rxjava-adapter.version>1.2.1rxjava-adapter.version>
<saaj-impl.version>1.5.1saaj-impl.version>
<selenium.version>3.141.59selenium.version>
<selenium-htmlunit.version>2.36.0selenium-htmlunit.version>
<sendgrid.version>4.4.5sendgrid.version>
<servlet-api.version>4.0.1servlet-api.version>
<slf4j.version>1.7.30slf4j.version>
<snakeyaml.version>1.25snakeyaml.version>
<solr.version>8.2.0solr.version>
<spring-amqp.version>2.2.5.RELEASEspring-amqp.version>
<spring-batch.version>4.2.1.RELEASEspring-batch.version>
<spring-cloud-connectors.version>2.0.7.RELEASEspring-cloud-connectors.version>
<spring-data-releasetrain.version>Moore-SR5spring-data-releasetrain.version>
<spring-framework.version>5.2.4.RELEASEspring-framework.version>
<spring-hateoas.version>1.0.3.RELEASEspring-hateoas.version>
<spring-integration.version>5.2.4.RELEASEspring-integration.version>
<spring-kafka.version>2.3.6.RELEASEspring-kafka.version>
<spring-ldap.version>2.3.2.RELEASEspring-ldap.version>
<spring-restdocs.version>2.0.4.RELEASEspring-restdocs.version>
<spring-retry.version>1.2.5.RELEASEspring-retry.version>
<spring-security.version>5.2.2.RELEASEspring-security.version>
<spring-session-bom.version>Corn-SR1spring-session-bom.version>
<spring-ws.version>3.0.8.RELEASEspring-ws.version>
<sqlite-jdbc.version>3.28.0sqlite-jdbc.version>
<sun-mail.version>${jakarta-mail.version}sun-mail.version>
<thymeleaf.version>3.0.11.RELEASEthymeleaf.version>
<thymeleaf-extras-data-attribute.version>2.0.1thymeleaf-extras-data-attribute.version>
<thymeleaf-extras-java8time.version>3.0.4.RELEASEthymeleaf-extras-java8time.version>
<thymeleaf-extras-springsecurity.version>3.0.4.RELEASEthymeleaf-extras-springsecurity.version>
<thymeleaf-layout-dialect.version>2.4.1thymeleaf-layout-dialect.version>
<tomcat.version>9.0.31tomcat.version>
<unboundid-ldapsdk.version>4.0.14unboundid-ldapsdk.version>
<undertow.version>2.0.29.Finalundertow.version>
<versions-maven-plugin.version>2.7versions-maven-plugin.version>
<webjars-hal-browser.version>3325375webjars-hal-browser.version>
<webjars-locator-core.version>0.41webjars-locator-core.version>
<wsdl4j.version>1.6.3wsdl4j.version>
<xml-maven-plugin.version>1.0.2xml-maven-plugin.version>
<xmlunit2.version>2.6.3xmlunit2.version>
properties>
特别特别多的坐标,原来SpringBoot就在这里帮助我们来管理版本,所以说这个是版本仲裁中心也不为过了。后期如果你想要使用某个jar
的其他版本可以在这里进行管理.