Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Latest commit

 

History

History
44 lines (31 loc) · 1.19 KB

File metadata and controls

44 lines (31 loc) · 1.19 KB

Play module intends to speed up development of large projects with Play 1 framework.

This is a work in progress.

The aim is to:

  • disable enhancers
  • disable Play's own compilation of Java code
  • simplify classloading

How to migrate from "classic" Play1 application to play-rebel

Find all "classic" redirects

  1. Add this line to your play.plugins:
0:play.rebel.PlayRebelAntiEnhancerPlugin
2000:play.rebel.migration.LegacyRedirectsDetector
  1. Start your Play application
  2. Find phrase legacy redirects in logs
  3. Add this line to every controller:
  protected static Redirector redirect = new Redirector();
  1. Replace every call to "action" method, like SomeController.someAction() by
  redirect.to("SomeController.someAction");
  1. Replace every call to "action" method with parameters, like SomeController.someAction(42, "yip") by
  redirect.with("userId", 42).with("password", "yip").to("SomeController.someAction");
  1. Replace every call to Validation.valid(Object) with a call to Validation.valid(String, Object)
  2. Don't use methods:
  • play.db.jpa.GenericModel.validateAndSave()
  • play.db.jpa.GenericModel.validateAndCreate()