I am learning Play Framework 2.9 for Java and I am creating boilerplate templates to show how to do basic stuff.
- Reading URL query parameters examples
- Creating, reading and deleting Cookie
- Creating, reading and deleting Session and protecting the resource behind the login
- Database selects, inserts using Hibernate 6.x and JPA
- Basic filter example
- Full example of how to use html forms and validations, including showing form errors in UI
- Example of running background task every minute
- Example implementation of reCAPTCHA in Java from Google
- Example implementation of OAuth 2.0 in Java for Facebook and Google using ScribeJava SDK
- Basic authentication example in Java
- Login API example with generating JWT token and accesing protected API resource with this token
- Download the repository and unzip it.
- Run the command "sbt run" from the repository directory.
- Open web browser http://localhost:9000
- Tested with Java 21
- Play Framework 2.9
- H2 database for database example
- Hibernate 6.x for JPA example
https://github.com/ertra/play-framework-by-example
Tomas Zeman: tomas.zeman via email from gmail.com