-2

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.

javapapo
  • 1,342
  • 14
  • 26
fashuser
  • 2,152
  • 3
  • 29
  • 51

1 Answers1

2

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.

javapapo
  • 1,342
  • 14
  • 26
  • Thanks javapapo for quick answer! Do you know any alternative approaches to avoid spring boot? – fashuser Dec 30 '15 at 13:58
  • Well it really depends on what you want to do. Either you migrate to Spring Boot / Spring 4 combo (whatever that means to your code base), or you try to leverage the existing Spring modules on the versions you are (3) and develop your solution. I guess using Spring MVC (Spring REST) would be a potential solution see [here](http://spring.io/blog/2009/03/08/rest-in-spring-3-mvc/) – javapapo Dec 30 '15 at 14:01