javaspring-3hibernate3

org.springframework.boot.SpringApplication with spring-core 3.2.5.RELEASE


I am going to create simple rest service using spring 3 and hibernate 3. There is no chance for me to use higher version of spring due to legacy business component that is based on hibernate 3.

For such purposes I've tried to use SpringApplication.run, bet recieved following exception:

Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames

Is it possible to use spring-boot-maven-plugin with old spring version? Would be good to know any alternative ways in this direction.


Solution

  • Spring Boot (and all the related tools, e.g the maven plugin) expect Spring v4 and above. Please see the official documentation here.

    By default, Spring Boot 1.3.2.BUILD-SNAPSHOT requires Java 7 and Spring Framework 4.1.5 or above.