Skip to content
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
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5ceb5bb
empty kalix project
aklikic Dec 8, 2023
5222eb8
rename to java-spring-cinema-booking-choreography
aklikic Dec 11, 2023
7392044
ci & make update
aklikic Dec 11, 2023
e4b94f8
doc wip 2
aklikic Dec 12, 2023
7f22ede
-code
aklikic Dec 13, 2023
cd37d3e
-missing image
aklikic Dec 13, 2023
25c13d0
-fix for pom.xml kalixOrganization property. org needs to be used ins…
aklikic Dec 14, 2023
7a3683e
Text updates until 'Successful charge route'
ennru Dec 14, 2023
11791eb
-java code formating in README
aklikic Dec 14, 2023
2fb0bc2
More readme review
ennru Dec 15, 2023
c3b0fbc
More readme updates
ennru Dec 15, 2023
7ce3592
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic Dec 19, 2023
b58dd4c
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic Dec 19, 2023
8de37d2
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic Dec 19, 2023
d5e01f1
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic Dec 19, 2023
6472356
Update samples/java-spring-cinema-booking-choreography/README.md
aklikic Dec 19, 2023
0578b19
- few additional formatting fixes
aklikic Dec 19, 2023
4132dbc
Merge branch 'main' into java-spring-cinema-booking
octonato Dec 19, 2023
512d393
update cinema show use cases with images that we do not need copyrigh…
aklikic Jan 12, 2024
f6ad4e7
adopting convention to add commands and events as inner records of th…
aklikic Jan 12, 2024
a171722
moving Response Record to common package
aklikic Jan 12, 2024
f980576
- command and event handler methods renamed from handleReservation an…
aklikic Jan 12, 2024
ef74de3
- removed random uuid abstraction methods
aklikic Jan 12, 2024
7989027
- random Show title name change
aklikic Jan 12, 2024
ff11f8d
docs: choreography saga quickstart (#1884)
octonato Dec 12, 2023
1b80e6a
- WebClient replaced with ComponentClient
aklikic Jan 12, 2024
3646d2e
- code format
aklikic Jan 15, 2024
3cbe872
feat: reading the collector endpoint from the ProxyInfo (#1893)
franciscolopezsancho Dec 11, 2023
7e43b60
chore: bump scala version 2.13.10 -> 2.13.12 (#1902)
aludwiko Dec 11, 2023
7e724b0
docs: choreography saga quickstart (#1884)
octonato Dec 12, 2023
8b0fc19
chore: fix typo (#1906)
octonato Dec 12, 2023
124e256
chore: bump scala tooling version 2.12.15 -> 2.12.18 (#1908)
aludwiko Dec 12, 2023
e8234a9
Use "Runtime" as Docker image and service names; Runtime 1.1.27 (#1895)
ennru Dec 12, 2023
b53fc81
chore: improve error message for JSON deserialization (#1911)
aludwiko Dec 13, 2023
f3da4a9
docs: actions as service life-cycle hooks (#1909)
efgpinto Dec 13, 2023
732292c
chore: bump SDK versions to 1.3.6 (#1915)
kalix-bot Dec 13, 2023
16e01fe
fix: maven archetype kcr vars (#1917)
efgpinto Dec 14, 2023
ba3d16c
fix: Hello world action exposed to the internet in code first archety…
aludwiko Dec 15, 2023
a5e374b
docs: documenting persistent dev mode (#1918)
aludwiko Dec 15, 2023
78e6738
chore: bump SDK versions to 1.3.7 (#1922)
kalix-bot Dec 15, 2023
51857a4
update cinema show use cases with images that we do not need copyrigh…
aklikic Jan 12, 2024
fdbe67e
adopting convention to add commands and events as inner records of th…
aklikic Jan 12, 2024
7c35644
moving Response Record to common package
aklikic Jan 12, 2024
599fd0e
- command and event handler methods renamed from handleReservation an…
aklikic Jan 12, 2024
67a87e3
- removed random uuid abstraction methods
aklikic Jan 12, 2024
58c0bf2
- random Show title name change
aklikic Jan 12, 2024
2c7c250
docs: choreography saga quickstart (#1884)
octonato Dec 12, 2023
707f398
- WebClient replaced with ComponentClient
aklikic Jan 12, 2024
ec519d9
- code format
aklikic Jan 15, 2024
614675b
- removing unused command
aklikic Jan 15, 2024
4753b22
Merge remote-tracking branch 'origin/java-spring-cinema-booking' into…
aklikic Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ jobs:
- { sample: java-spring-transfer-workflow, it: true }
- { sample: java-spring-transfer-workflow-compensation, it: true }

- { sample: java-spring-cinema-booking-choreography, it: true }

steps:
- name: Checkout
# v3.1.0
Expand Down
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ bundles:
bin/bundle.sh --zip "${java_managed_attachments}/java-spring-customer-registry-quickstart.zip" ../samples/java-spring-customer-registry-quickstart
bin/bundle.sh --zip "${java_managed_attachments}/java-spring-customer-registry-views-quickstart.zip" ../samples/java-spring-customer-registry-views-quickstart
bin/bundle.sh --zip "${java_managed_attachments}/java-spring-shopping-cart-quickstart.zip" ../samples/java-spring-shopping-cart-quickstart
bin/bundle.sh --zip "${java_managed_attachments}/java-spring-cinema-booking-choreography.zip" ../samples/java-spring-cinema-booking-choreography
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suffix it with -quickstart

bin/bundle.sh --zip "${java_pb_managed_attachments}/java-protobuf-customer-registry-quickstart.zip" ../samples/java-protobuf-customer-registry-quickstart
bin/bundle.sh --zip "${java_pb_managed_attachments}/java-protobuf-customer-registry-views-quickstart.zip" ../samples/java-protobuf-customer-registry-views-quickstart
bin/bundle.sh --zip "${java_pb_managed_attachments}/java-protobuf-customer-registry-kafka-quickstart.zip" ../samples/java-protobuf-customer-registry-kafka-quickstart
Expand Down
3 changes: 3 additions & 0 deletions samples/java-spring-cinema-booking-choreography/.bundleignore
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 samples/java-spring-cinema-booking-choreography/README.md

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions samples/java-spring-cinema-booking-choreography/docker-compose.yml
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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 samples/java-spring-cinema-booking-choreography/pom.xml
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>
Loading