title: How to run Spring boot with older version of hibernate
body: <p>I am creating a fresh new project using spring boot 1.5, with a dependent entity module ( Created way back in 2012 ).</p>
  
  <p>Entity module is using older version of hibernate ( 3.3.2 ), I can't 
  modify entity module. </p>
  
  <p>Entity module is using following annotation which is removed with Hibernate5 ( comes default by spring boot 1.5 )</p>
  
  <pre><code>CollectionOfElements
  MapKey
  @ForeignKey
  @IndexColumn
  </code></pre>
  
  <p>I know in that we can give different version of  jars can be used in spring boot, I tried by overriding but it didn't work</p>
  
  <p>Any help or guide will be highly appriciated, Thanks A Lot</p>
  
  <pre><code>&lt;!-- HIBERNATE OLDER VERSION COMPATIBILITY --&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-annotations --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-annotations&lt;/artifactId&gt;
              &lt;version&gt;3.4.0.GA&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.GA&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate --&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;version&gt;3.3.2.GA&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
              &lt;version&gt;3.3.2.GA&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>