-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java spring cinema booking quickstart #1916
Closed
Closed
Changes from 11 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
5ceb5bb
empty kalix project
aklikic 5222eb8
rename to java-spring-cinema-booking-choreography
aklikic 7392044
ci & make update
aklikic e4b94f8
doc wip 2
aklikic 7f22ede
-code
aklikic cd37d3e
-missing image
aklikic 25c13d0
-fix for pom.xml kalixOrganization property. org needs to be used ins…
aklikic 7a3683e
Text updates until 'Successful charge route'
ennru 11791eb
-java code formating in README
aklikic 2fb0bc2
More readme review
ennru c3b0fbc
More readme updates
ennru 7ce3592
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic b58dd4c
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic 8de37d2
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic d5e01f1
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic 6472356
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic 0578b19
- few additional formatting fixes
aklikic 4132dbc
Merge branch 'main' into java-spring-cinema-booking
octonato 512d393
update cinema show use cases with images that we do not need copyrigh…
aklikic f6ad4e7
adopting convention to add commands and events as inner records of th…
aklikic a171722
moving Response Record to common package
aklikic f980576
- command and event handler methods renamed from handleReservation an…
aklikic ef74de3
- removed random uuid abstraction methods
aklikic 7989027
- random Show title name change
aklikic ff11f8d
docs: choreography saga quickstart (#1884)
octonato 1b80e6a
- WebClient replaced with ComponentClient
aklikic 3646d2e
- code format
aklikic 3cbe872
feat: reading the collector endpoint from the ProxyInfo (#1893)
franciscolopezsancho 7e43b60
chore: bump scala version 2.13.10 -> 2.13.12 (#1902)
aludwiko 7e724b0
docs: choreography saga quickstart (#1884)
octonato 8b0fc19
chore: fix typo (#1906)
octonato 124e256
chore: bump scala tooling version 2.12.15 -> 2.12.18 (#1908)
aludwiko e8234a9
Use "Runtime" as Docker image and service names; Runtime 1.1.27 (#1895)
ennru b53fc81
chore: improve error message for JSON deserialization (#1911)
aludwiko f3da4a9
docs: actions as service life-cycle hooks (#1909)
efgpinto 732292c
chore: bump SDK versions to 1.3.6 (#1915)
kalix-bot 16e01fe
fix: maven archetype kcr vars (#1917)
efgpinto ba3d16c
fix: Hello world action exposed to the internet in code first archety…
aludwiko a5e374b
docs: documenting persistent dev mode (#1918)
aludwiko 78e6738
chore: bump SDK versions to 1.3.7 (#1922)
kalix-bot 51857a4
update cinema show use cases with images that we do not need copyrigh…
aklikic fdbe67e
adopting convention to add commands and events as inner records of th…
aklikic 7c35644
moving Response Record to common package
aklikic 599fd0e
- command and event handler methods renamed from handleReservation an…
aklikic 67a87e3
- removed random uuid abstraction methods
aklikic 58c0bf2
- random Show title name change
aklikic 2c7c250
docs: choreography saga quickstart (#1884)
octonato 707f398
- WebClient replaced with ComponentClient
aklikic ec519d9
- code format
aklikic 614675b
- removing unused command
aklikic 4753b22
Merge remote-tracking branch 'origin/java-spring-cinema-booking' into…
aklikic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
samples/java-spring-cinema-booking-choreography/.bundleignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
target | ||
.* | ||
dependency-reduced-pom.xml |
1,379 changes: 1,379 additions & 0 deletions
1,379
samples/java-spring-cinema-booking-choreography/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
samples/java-spring-cinema-booking-choreography/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
# If you're looking to use eventing with Google PubSub, to get an emulator running: | ||
# - add property "-Dkalix.proxy.eventing.support=google-pubsub-emulator" to the JAVA_TOOL_OPTIONS environment map under the kalix-proxy service | ||
# - uncomment the env var PUBSUB_EMULATOR_HOST and the section below for gcloud-pubsub-emulator service | ||
version: "3" | ||
services: | ||
kalix-proxy: | ||
image: gcr.io/kalix-public/kalix-proxy:1.1.23 | ||
container_name: java-spring-cinema-booking-choreography | ||
ports: | ||
- "9000:9000" | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
environment: | ||
JAVA_TOOL_OPTIONS: > | ||
# jvm -D properties can be under this environment map (note: remove this comment when adding properties) | ||
USER_FUNCTION_HOST: ${USER_FUNCTION_HOST:-host.docker.internal} | ||
USER_FUNCTION_PORT: ${USER_FUNCTION_PORT:-8080} | ||
# Comment to enable ACL check in dev-mode (see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls) | ||
ACL_ENABLED: "false" | ||
# Uncomment to enable advanced view features locally (note: disabled in deployed services by default) | ||
#VIEW_FEATURES_ALL: "true" | ||
# Uncomment to disable the JWT dev secret | ||
#JWT_DEV_SECRET: "false" | ||
# Uncomment to set the JWT dev secret issuer | ||
#JWT_DEV_SECRET_ISSUER: "my-issuer" | ||
# Uncomment if using pubsub emulator | ||
#PUBSUB_EMULATOR_HOST: gcloud-pubsub-emulator | ||
#gcloud-pubsub-emulator: | ||
# image: gcr.io/google.com/cloudsdktool/cloud-sdk:341.0.0 | ||
# command: gcloud beta emulators pubsub start --project=test --host-port=0.0.0.0:8085 | ||
# ports: | ||
# - 8085:8085 | ||
|
Binary file added
BIN
+30.6 KB
samples/java-spring-cinema-booking-choreography/images/BoundedContext-Show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.7 KB
samples/java-spring-cinema-booking-choreography/images/BoundedContext-Wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.3 KB
samples/java-spring-cinema-booking-choreography/images/ContextMap-Choreography.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.53 KB
...java-spring-cinema-booking-choreography/images/EventStorming-AggregateRoots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.4 KB
samples/java-spring-cinema-booking-choreography/images/EventStorming-BookFlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.74 KB
...les/java-spring-cinema-booking-choreography/images/EventStorming-CreateShow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.08 KB
...s/java-spring-cinema-booking-choreography/images/EventStorming-CreateWallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.07 KB
samples/java-spring-cinema-booking-choreography/images/EventStorming-legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+65.5 KB
samples/java-spring-cinema-booking-choreography/images/KalixDesign-ContextMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+65.1 KB
samples/java-spring-cinema-booking-choreography/images/KalixDesign-Show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.4 KB
samples/java-spring-cinema-booking-choreography/images/KalixDesign-Wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+167 KB
samples/java-spring-cinema-booking-choreography/images/cinema-show-usecase.png
aklikic marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
288 changes: 288 additions & 0 deletions
288
samples/java-spring-cinema-booking-choreography/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,288 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.1.5</version> | ||
<relativePath/> | ||
</parent> | ||
<groupId>com.example</groupId> | ||
<artifactId>java-spring-cinema-booking-choreography</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>java-spring-cinema-booking</name> | ||
<properties> | ||
|
||
<!-- For Docker setup see https://docs.kalix.io/projects/container-registries.html --> | ||
<kalixContainerRegistry>kcr.us-east-1.kalix.io</kalixContainerRegistry> | ||
<kalixOrganization>lightbend</kalixOrganization> | ||
<dockerImage>${kalixContainerRegistry}/${kalixOrganization}/${project.artifactId}</dockerImage> | ||
<dockerTag>${project.version}-${build.timestamp}</dockerTag> | ||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> | ||
<mainClass>com.example.Main</mainClass> | ||
<jdk.target>21</jdk.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
|
||
<kalix-sdk.version>1.3.5</kalix-sdk.version> | ||
|
||
<java.version>21</java.version> | ||
</properties> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
</resource> | ||
</resources> | ||
|
||
<extensions> | ||
<extension> | ||
<groupId>kr.motd.maven</groupId> | ||
<artifactId>os-maven-plugin</artifactId> | ||
<version>1.7.1</version> | ||
</extension> | ||
</extensions> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<transformers combine.children="append"> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | ||
<resource>reference.conf</resource> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>${jdk.target}</source> | ||
<target>${jdk.target}</target> | ||
<compilerArgs> | ||
<arg>-Xlint:deprecation</arg> | ||
<arg>-parameters</arg> | ||
</compilerArgs> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<version>0.43.4</version> | ||
<configuration> | ||
<images> | ||
<image> | ||
<name>${dockerImage}:%l</name> | ||
<build> | ||
<!-- Base Docker image which contains jre--> | ||
<from>docker.io/library/eclipse-temurin:${jdk.target}-alpine</from> | ||
<createImageOptions> | ||
<platform>linux/amd64</platform> | ||
</createImageOptions> | ||
<tags> | ||
<!-- tag for generated image --> | ||
<tag>${dockerTag}</tag> | ||
</tags> | ||
<ports> | ||
<!-- expose port in Docker container --> | ||
<port>8080</port> | ||
</ports> | ||
<assembly> | ||
<!-- NOTE: (optional) switch to "artifact-with-dependencies" to show dependencies library--> | ||
<descriptorRef>artifact</descriptorRef> | ||
</assembly> | ||
<entryPoint> | ||
<arg>java</arg> | ||
<arg>-jar</arg> | ||
<arg>/maven/${project.build.finalName}.jar</arg> | ||
</entryPoint> | ||
</build> | ||
</image> | ||
</images> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>build-docker-image</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>push-docker-image</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>push</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<!-- configure src/it/java and src/it/resources --> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>add-integration-test-source</id> | ||
<phase>generate-test-sources</phase> | ||
<goals> | ||
<goal>add-test-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>src/it/java</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>add-integration-test-resource</id> | ||
<phase>generate-test-resources</phase> | ||
<goals> | ||
<goal>add-test-resource</goal> | ||
</goals> | ||
<configuration> | ||
<resources> | ||
<resource> | ||
<directory>src/it/resources</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<excludes> | ||
<!-- ignore integration test classes --> | ||
<exclude>**/*IntegrationTest</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>io.kalix</groupId> | ||
<artifactId>kalix-maven-plugin</artifactId> | ||
<version>${kalix-sdk.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>deploy</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<dockerImage>${dockerImage}:${dockerTag}</dockerImage> | ||
<mainClass>${mainClass}</mainClass> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>3.1.1</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<!-- run Integration Tests in src/it/java with `mvn verify -Pit`--> | ||
<id>it</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<!-- run *IntegrationTest with failsafe --> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>integration-test</goal> | ||
<goal>verify</goal> | ||
</goals> | ||
<configuration> | ||
<includes> | ||
<include>**/*IntegrationTest</include> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.kalix</groupId> | ||
<artifactId>kalix-spring-boot-starter</artifactId> | ||
<version>${kalix-sdk.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.kalix</groupId> | ||
<artifactId>kalix-spring-boot-starter-test</artifactId> | ||
<version>${kalix-sdk.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.vavr</groupId> | ||
<artifactId>vavr</artifactId> | ||
<version>0.10.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<version>3.23.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.awaitility</groupId> | ||
<artifactId>awaitility</artifactId> | ||
<version>4.2.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
</project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suffix it with
-quickstart