Pergunta

I'm trying to use Play with java 8 and spring dependency injection. The problem is that play (com.typesafe.play:play-java_2.10:2.2.2) depends on spring 3.2.3 and spring's full support for java 8 compile level (1.8) is intoduced in spring 4.0.

If I use spring 3.2.3, I get the following exception when spring is trying to load the beans at app startup:

ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet

So my options are:

  1. Not using spring and create singletons for my service and dao objects
  2. Use guice or other frameworks for DI and I'm not sure about the compatibility of them with play dependencies either.
  3. Not using java 8 features which is very unpleasant because I can't use lambda expressions which is very useful in Play's async scenarios.

Do I have any other options? mainly can I somehow make play work with spring 4?

And Is there any announced time for upgrading to spring 4 in Play's roadmap?

Foi útil?

Solução

You can use Play 2.3-M1! that depend on Spring 4 which Java 8 supported.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top