O'Reilly logo

Play Framework Cookbook - Second Edition by Giancarlo Inductivo, Alexander Reelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a flexible registration module

In this recipe, we will create a new registration module that will manage user registration and authentication requests. Creating a module for this allows us to reuse a very common workflow in the modern web application.

How to do it…

For Java, we need to perform the following steps:

  1. Run the foo_java application with Hot-Reloading enabled:
        activator "~run"
    
  2. Inside the modules directory, foo_java/modules, generate the registration module project using the activator:
        activator new registration play-java
    
  3. Add the dependency between the root project, foo_java, and the module, registration, in foo_java/build.sbt:
     lazy val root = (project in file(".")) .enablePlugins(PlayJava) .aggregate(filemon) .dependsOn(filemon) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required