14

I tried to read documents regarding Spring BOM, Spring Boot and Spring IO.
But there is no clarification on, how we should use them together or not?
In my project, we already have our own Parent POM
, So I can’t use as parent them but all they have alternative way to use, Like below by defining dependency management

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>${org.springframework-version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
         <dependency>
             <!-- Import dependency management from Spring Boot -->
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>1.2.5.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Spring BOM, Spring Boot and Spring IO resolve version required for you
So what is exactly difference between them? Which one should I prefer? And in Which condition?

Viraj
  • 1,360
  • 3
  • 18
  • 38
  • Spring BOM is a Bill Of Materials, this is a Maven construct to import dependency management sections into a pom. The other two items, Boot and IO are Spring libraries. You are comparing apples and oranges and can use all, some or none of them. I think you need to do some more reading. – Boris the Spider Jul 10 '15 at 08:43
  • do you have any special requirement based on what do you want to get recommendation? you might want to check this question http://stackoverflow.com/questions/29038571/spring-boot-uses-spring-io-implicitly/29064854#29064854 – sodik Jul 10 '15 at 08:46

1 Answers1

22

The Spring Framework bom provides dependency management for all of Spring Framework's modules. The Spring Boot bom is a superset of this. In addition to providing dependency management for Spring Framework, it also provides dependency management for Spring Boot's modules, a number of other Spring projects, and various third-party dependencies which Spring Boot supports. The Spring IO Platform bom is, in turn, a superset of the Spring Boot bom. The main change is that it adds dependency management for all of the Spring projects' dependencies.

If you're not using Spring Boot, or if you want to use your own dependency management, then you may want to use the Spring Framework bom . If you're using Spring Boot, or you want some help with dependency management, then you should choose between using Spring Boot's bom or the Spring IO Platform bom. The main choice here is how close to the leading edge you want to be. If you favour being up-to-date then use the Spring Boot bom. If your project is more conservative and backwards compatibility is of paramount importance, then you should consider using the Spring IO platform bom.

Andy Wilkinson
  • 108,729
  • 24
  • 257
  • 242
  • 4
    You wrote, Spring IO is a superset of the Spring Boot. Why then, using Spring IO is more conservative than using Spring Boot? If I upgrade Spring IO then more libraries will change and potentially I will have more compilation errors. – Michał Mielec Mar 15 '19 at 12:32
  • BTW, Spring IO reached end of its supported life on 9 April 2019. – Rahul Khimasia Feb 20 '20 at 16:00