Play 2.4.0 "Damiya" is released

4,150 views
Skip to first unread message

Greg Methvin

unread,
May 27, 2015, 8:37:28 PM5/27/15
to play-framework, play-fram...@googlegroups.com

After a year of development the Play Team is excited to announce the release of Play 2.4.0 “Damiya”.


Play 2.4 gives you more modularity and flexibility. You can now configure your application with dependency injection. Or you can embed it in another application. You can mock parts of your application more easily. Play modules like Ebean and anorm have become their own projects, allowing them to release more often on their own schedules. All of this makes Play more powerful than ever before.


What’s new in Play 2.4


  1. Dependency injection out of the box.

  2. Testing is easier thanks to better support for mocking.

  3. It is now straightforward to embed Play in your application.

  4. You can now aggregate reverse routers from multiple projects.

  5. More Java 8 integration—Java 8 is now required.

  6. Choice of standard project layout.

  7. Many new anorm features. Anorm is now its own project!

  8. Upgraded to Ebean 4. Play-Ebean is (also) its own project!

  9. HikariCP is the default connection pool

  10. WS supports Server Name Identification (SNI).

  11. Simplified Logback configuration.

  12. Play’s bytecode enhancement has been separated out into its own project.

  13. More flexible IDE support.

  14. Lots of work on improving the documentation.


For details see the Play 2.4 Highlights and the Play 2.4 Migration Guide.


Damiya


Play 2.4 has been named “Damiya”, in memory of Play contributor Kate von Roeder, who went by the alias damiya on GitHub.


Download Play 2.4.0


If you already have Activator installed, run activator new and choose play-scala or play-scala to create a new Play 2.4.0 project. Visit the Play downloads page for information on how to download and install Activator, and get started with Play.


Credits


Development of Play 2.4 has been underway for a year. The 2.4.0 release is made up of over 1000 commits by 176 different people. Of the 176 contributors, 129 are new to the Play project. That makes an all-time total of 494 contributors to Play.


It’s not all about the code either. We’d also like to thank everyone that got involved in the community in other ways too, reporting bugs, on the mailing list, on Stack Overflow and in our new Gitter chat room. It’s amazing to see the growing size and strength of Play’s community.


Thanks a lot everyone, we couldn’t do it without you!


– The Play Team

Ben McCann

unread,
May 27, 2015, 8:47:49 PM5/27/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Woohoo! Best Play release yet!

Giovanni

unread,
May 27, 2015, 9:18:43 PM5/27/15
to play-fr...@googlegroups.com
Wonderful!

I am starting to use it immediately.

Thanks a lot for the smart and hard work.

Best regards,
giovanni


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/55f1f9e7-864d-4035-a1be-8e6435cd1af0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Knowledge is knowing a tomato is a fruit.

Wisdom is not putting it into a fruit salad.


A person is just about as big as the things that make him angry.


Be cheerful while you are alive.

                -- Phathotep, 24th Century B.C.


Anyone can become angry -- that is easy; but to be angry with the right
person, to the right degree, at the right time, for the right purpose
and in the right way -- that is not easy.
                -- Aristotle

Christopher Hunt

unread,
May 27, 2015, 9:51:57 PM5/27/15
to play-framework, play-fram...@googlegroups.com
Congratulations to the extended team and to the community at large - this is an amazing release.

Nice also to recognise Damiya.

Rock on!

Kind regards,
Christopher

-- 
Christopher Hunt
ConductR Tech Lead
Typesafe – Build Reactive Apps on the JVM!

Twitter: @huntchr

Yann Simon

unread,
May 28, 2015, 2:17:40 AM5/28/15
to Christopher Hunt, play-framework, play-fram...@googlegroups.com
congrats everybody involved.
I am still amazed how play evolved while kept simple and (almost) backwards compatible!

It is a great lesson about how software can live for a long time.

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-...@googlegroups.com.

Marios Papasofokli

unread,
May 28, 2015, 2:46:40 AM5/28/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Great news, we are upgrading the next few days. 

A big thank you to everyone involved! 

Kind Regards,

Marios Papasofokli
Software Engineer @RadiantFleet

Lutz Hühnken

unread,
May 28, 2015, 3:26:24 AM5/28/15
to play-fr...@googlegroups.com

Huge congrats to everyone involved!

Wait, just getting towards the end..

> run activator new and choose play-scala or play-scala 

Being a big Scala fan, I love the Scala bias... but just for completeness, Java devs, you can in fact also choose play-java ;)

Rich Dougherty

unread,
May 28, 2015, 3:39:06 AM5/28/15
to play-framework
On Thu, May 28, 2015 at 7:26 PM, Lutz Hühnken <lutz.h...@gmail.com> wrote:
> run activator new and choose play-scala or play-scala 

Being a big Scala fan, I love the Scala bias... but just for completeness, Java devs, you can in fact also choose play-java ;)

Sorry Java devs, that was my mistake. Don't worry, we love you too!

– Rich

--
Rich Dougherty
Engineer, Typesafe, Inc

Markus Jura

unread,
May 28, 2015, 5:34:31 AM5/28/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Huge congrats, especially to the 2/3 of new committers. This is outstanding!

Sean Brady

unread,
May 28, 2015, 7:37:23 AM5/28/15
to play-fr...@googlegroups.com
Excellent work! Thanks to all the contributors!

laguiz

unread,
May 28, 2015, 8:26:35 AM5/28/15
to play-fr...@googlegroups.com
Seems that I cannot get `com.typesafe.sbt#play-enhancer;1.1.0`.

I followed `Bytecode enhancement` from https://www.playframework.com/documentation/2.4.x/Migration24 .


Any idea?

Btw, very excited about this release!

Tazobactam

unread,
May 28, 2015, 11:03:40 AM5/28/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Congratulations to the team. In my opinion - as someone who only has dabbled in play and follows the issues/pull requests on a daily basis as a reader - Plays best release yet. It's nice to see how far Play has come since the initial 2nd version. But already looking forward to version 3 when you will get rid of the global state entirely.

Michael Slinn

unread,
May 28, 2015, 2:10:05 PM5/28/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
All of the material in our "Introduction to Play" course, including code examples and lecture notes has been updated to Play 2.4.0

Mike

Jun Yamog

unread,
May 28, 2015, 5:35:35 PM5/28/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Congratulations to the play team and contributors. We are looking forward to the upgrade and make testing of our components easier.
On Fri, 29 May 2015 at 6:10 am Michael Slinn <msl...@gmail.com> wrote:
All of the material in our "Introduction to Play" course, including code examples and lecture notes has been updated to Play 2.4.0

Mike

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
Message has been deleted

Christian Schmitt

unread,
May 29, 2015, 8:59:26 AM5/29/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
I still don't get the thing with the ApplicationLifecycle. I tried the same thing as in the guide: https://www.playframework.com/documentation/2.4.x/JavaDependencyInjection
However I always get the following errors:
CreationException: Unable to create injector, see the following errors: 1) Error injecting constructor, java.lang.RuntimeException: There is no started application at de.envisia.search.services.SearchService.<init>(SearchService.java:29) at de.envisia.search.modules.SearchModule.configure(SearchModule.java:12) (via modules: com.google.inject.util.Modules$OverrideModule -> de.envisia.search.modules.SearchModule) while locating de.envisia.search.services.SearchService 1 error

or

CreationException: Unable to create injector, see the following errors: 1) No implementation for play.inject.ApplicationLifecycle was bound. while locating play.inject.ApplicationLifecycle for parameter 0 at de.envisia.search.services.SearchService.<init>(SearchService.java:29) at de.envisia.search.modules.SearchModule.configure(SearchModule.java:12) (via modules: com.google.inject.util.Modules$OverrideModule -> de.envisia.search.modules.SearchModule) 1 error

laguiz

unread,
May 29, 2015, 9:24:22 AM5/29/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
I got this error multiple times but I finally figure out by reading the doc properly starting from https://www.playframework.com/documentation/2.4.x/Migration24 and https://www.playframework.com/documentation/2.4.x/GlobalSettings

In my case I needed the current Environment and Configuration (previously accessible from Play static methods). What I did (the idea) :

1. Create @Singleton `Global.java` and @Inject in Constructor what you need

import play.Configuration;
import play.Environment;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class Global {

@Inject
public Global(Environment environment, Configuration configuration
) {
        //Access to environment.isDev() and configuration
}

}

2. Eager init your Global @Singleton with a Module like this (tips from documentation) : 
```
public class AppModule extends AbstractModule {

protected void configure() {
//Eager load Global to ensure we init stuff when application start
bind(Global.class).asEagerSingleton();
}

}

3. Add in you `application.conf` your module

play.modules.enabled += "modules.AppModule"


In my case I created more "levels" of injection (Global use injected MyStuff that use injected Environment in MyStuff class controller) but the idea is the same.


Does this help?

Christian Schmitt

unread,
May 29, 2015, 9:32:56 AM5/29/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Oh yeah it would have helped, but I read that paragraph aswell, the last minutes, however I didn't thought that I could inject Configuration, since Configuration gets injected into the abstract module. which has no @Inject annotation..
...

Mohsen Kashi

unread,
May 30, 2015, 3:37:32 AM5/30/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
getControllerInstance removed from GlobalSettings and there is not any solution about it in migration guide. I set Spring DI in my project and now I cant migrate to play 2.4 

Lawrence Kim

unread,
May 30, 2015, 9:47:51 AM5/30/15
to play-fram...@googlegroups.com, play-fr...@googlegroups.com
Congratulations! I'm happy to meet Damiya.

Thanks for every contributor.

2015년 5월 28일 목요일 오전 9시 37분 12초 UTC+9, Greg Methvin 님의 말:

Rich Dougherty

unread,
May 30, 2015, 1:58:34 PM5/30/15
to Mohsen Kashi, play-framework, play-fram...@googlegroups.com
We've designed Play 2.4 dependency injection system to work well with Spring. Here's a proof of concept from last year, it would be great it someone could take the proof of concept and update and maintain it!

– Rich

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Igmar Palsenberg

unread,
Jun 1, 2015, 6:11:43 AM6/1/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
 
1) Error injecting constructor, java.lang.RuntimeException: There is no started application at de.envisia.search.services.SearchService.<init>(SearchService.java:29) at de.envisia.search.modules.SearchModule.configure(SearchModule.java:12) (via modules: com.google.inject.util.Modules$OverrideModule -> de.envisia.search.modules.SearchModule) while locating de.envisia.search.services.SearchService

What is the actual code ? This usually happens if you either : 

1) Inject Application
2) Use Play.application()*


Igmar 

Saeed Zarinfam

unread,
Jun 1, 2015, 6:28:13 AM6/1/15
to play-fr...@googlegroups.com, mhmh...@gmail.com, play-fram...@googlegroups.com
This sample project is in Scala and also old, there is not any guide to setup Play 2.4 dependency injection with Spring DI and Java. please add a template project for it. We want to migrate our project to Play 2.4 but we do not want to use Guice.

Thanks.


On Saturday, May 30, 2015 at 10:28:34 PM UTC+4:30, Rich Dougherty wrote:
We've designed Play 2.4 dependency injection system to work well with Spring. Here's a proof of concept from last year, it would be great it someone could take the proof of concept and update and maintain it!

– Rich

On Sat, May 30, 2015 at 7:37 PM, Mohsen Kashi <mhmh...@gmail.com> wrote:
getControllerInstance removed from GlobalSettings and there is not any solution about it in migration guide. I set Spring DI in my project and now I cant migrate to play 2.4 

James Roper

unread,
Jun 1, 2015, 10:43:55 AM6/1/15
to play-fr...@googlegroups.com, zarin...@gmail.com, play-fram...@googlegroups.com, mhmh...@gmail.com
On Monday, June 1, 2015 at 6:28:13 PM UTC+8, Saeed Zarinfam wrote:
This sample project is in Scala and also old, there is not any guide to setup Play 2.4 dependency injection with Spring DI and Java. please add a template project for it. We want to migrate our project to Play 2.4 but we do not want to use Guice.

Out of interest, why don't you want to use Guice?
 
Support for spring doesn't exist yet.  When Play 2.4.0-M1 was released, I did a proof of concept to make sure that a Spring support could be implemented:


It's way out of date, needs a lot of work, and is waiting for someone to take ownership of it to complete it.

v6ak

unread,
Jun 2, 2015, 5:31:49 AM6/2/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
When one uses encryptAES/decryptAES, it is wise to doublecheck if the code is still secure after migration. Some details on new crypto API issues: https://groups.google.com/forum/#!topic/play-framework/Pao8MnADAqw

Regards,
Vít Šesták 'v6ak'


On Thursday, May 28, 2015 at 2:37:28 AM UTC+2, Greg Methvin wrote:

Saeed Zarinfam

unread,
Jun 3, 2015, 11:25:19 AM6/3/15
to play-fr...@googlegroups.com, mhmh...@gmail.com, play-fram...@googlegroups.com, zarin...@gmail.com
I use Guice and Spring ApplicationContext together in this project, I think this temporary solution fix our problem.  

Hari Kuragayala

unread,
Jun 5, 2015, 10:04:17 PM6/5/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
It's pretty slick.

Nash Gadre

unread,
Jun 16, 2015, 3:02:13 PM6/16/15
to play-fr...@googlegroups.com, play-fram...@googlegroups.com
Congrats Everyone!
Reply all
Reply to author
Forward
0 new messages