title: Overriding spring boot BOM curated dependency with higher version
body: <p>Spring boot document suggest mostly you don't need to override the BOM dependency in practice. </p>
  
  <p>As there are provisions to override the dependency. 
  Scenario :: 
  Declared in parent pom : </p>
  
  <pre><code>&lt;dependencyManagement&gt;
      &lt;dependencies&gt;
       &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt;
          &lt;version&gt;2.1.4&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
          &lt;scope&gt;import&lt;/scope&gt;
        &lt;/dependency&gt;
      &lt;/dependencies&gt;
    &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p>Declared in child pom</p>
  
  <pre><code> &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-data-mongodb&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Is it right/best practice to override spring-boot-starter-data-mongodb
   with higher version lets say 2.2.1 for spring boot 2.1.4</p>
  
  <p>My take is override with downgraded version seems okay in theory , but to upgrade to higher version may invite issues.</p>
  
  <p>Also despite overriding the declaration in parent pom, dependency of overridden dependency still as per the BOM decalaration.</p>
  
  <pre><code>&lt;dependencyManagement&gt;
      &lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-data-mongodb&lt;/artifactId&gt;
        &lt;version&gt;2.2.1.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
       &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt;
          &lt;version&gt;2.1.4&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
          &lt;scope&gt;import&lt;/scope&gt;
        &lt;/dependency&gt;
      &lt;/dependencies&gt;
    &lt;/dependencyManagement&gt;
  </code></pre>