Gunnar Kiesel
Gunnar Kiesel

Reputation: 783

Does Spring Security support jdk8?

Is Spring Security compatible with Java 8 (Oracle)?

I presume that v4 is, since it requires Spring v4 which does support jdk8. However I couldn't find any explicit information on this. I did check the Spring Security Bug Tracker and found one minor open issue with OpenJdk8 - however it was written before Spring Security v4 was released.

I couldn't find anything on Spring Security v3.x with jdk8. Does anyone know if that works/is supported?

Upvotes: 3

Views: 5337

Answers (2)

GoldDragonTSU
GoldDragonTSU

Reputation: 489

There is a section in the Spring Security Reference that states:

Spring Security 2.0.x requires a minimum JDK version of 1.4 [...]

Spring Security 3.0 and 3.1 require at least JDK 1.5 [...]

However, as noted in the question, this is not very explicit! Despite being a reference for Spring Security 4.2.0, the section quoted above has no details at all about Spring Security 4. I suspect that portion of the documentation is simply out of date.

A different portion of the documentation has this information (emphasis added):

There are a number of ways in which Spring Security can resolve the method arguments. [...] By default, the following options are tried for a method as a whole.

  • [...]
  • If JDK 8 was used to compile the source with the -parameters argument and Spring 4+ is being used, then the standard JDK reflection API is used to discover the parameter names. This works on both classes and interfaces.

Though not explicit, it seems illogical to document how Spring Security handles code compiled using JDK 8 if it does not work using JDK 8.

Upvotes: 2

szarlih
szarlih

Reputation: 135

Spring Framework 4.1.6 is also the first release to be formally compatible with the recently released JDK 8 update 40

it's from Spring blog

this should be helpful: spring-core 3.2.9 + java 8

Spring 3.2.x will only support Java 8 runtimes compiled against Java 7

Upvotes: 1

Related Questions