The lagom-recipes
repository is archived. It's contents have been moved to https://github.com/lagom/lagom-samples.
Lagom is an open source framework for building reactive microservice systems in Java or Scala. This repository contains code examples to help you understand how to achieve common goals. In general, code in each folder of this repository tries to answer a question of type "How do I xyz ?". For example: "How do I use RDBMS read-sides with Cassandra write-sides?".
Each example is usually built in two steps (git commits) where the first commit introduces an example project and the second commit introduces the minimum changes required to complete the example. For example: in commit 9f8de2f a new project is added which is edited in commit b759a18. You can browse the repo history to find the changes demonstrating how to solve each specific problem.
To download and run these examples you will need:
- a git client
- sbt or Maven depending on the example.
- a Java Development Kit
- a code editor (such as IntelliJ, Eclipse, Atom,... )
If you want to run a specific example you will have to clone the whole repository and then navigate to a specific application folder. For example:
git clone https://github.com/lagom/lagom-recipes.git
cd consumer-service/consumer-service-java-sbt
Each example includes specific instructions in it's README.md
file on how to run and exercise the application.
See CONTRIBUTING.md
.
- How do I enable CORS? (using Lagom's javadsl or scaladsl)
- How do I create a Subscriber only service? (also referred to as consumer service)
- How do I use RDBMS read-sides with Cassandra write-sides? (mixed persistence in java or mixed persistence in scala)
- How to create a stateless service in Lagom for Java that uses Play's Internationalization Support.
- How do I manipulate Headers and Status Codes and test those cases?(HTTP header handling)
- How do I handle
multipart/form-data
file uploads? (Scala example, Java example) - How do I use a custom message serializer and response header to implement file downloads? (Scala example)
- How do I integrate Lightbend Telemetry (Cinnamon)? (Java/Maven example)
- How do I configure the Circuit Breaker Panel for a Lagom Java application? (Java/Maven example)
- How do I deploy a Lagom Maven application in Kubernetes? (Java/Maven example)
- How do I use Lagom with Couchbase both write-side and read-side? Java Maven and Scala Sbt) (Couchbase Persistence is NOT production ready yet)
- How do I authenticate/authorize by JWT? (Scala example, Java example)