Skip to content

Commit c97849b

Browse files
committed
fixing example
Signed-off-by: salaboy <[email protected]>
1 parent 7de9850 commit c97849b

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

spring-boot-examples/producer-app/src/main/java/io/dapr/springboot/examples/producer/workflow/CustomerFollowupActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public Object run(WorkflowActivityContext ctx) {
2222
customer = customerStore.getCustomer(customer.getCustomerName());
2323
customer.setFollowUp(true);
2424
customerStore.addCustomer(customer);
25-
System.out.println("Customer: " + customer + " follow-up." + " - hashcode" + this.hashCode());
25+
System.out.println("Customer: " + customer + " follow-up.");
2626
return customer;
2727
}
2828

spring-boot-examples/producer-app/src/main/java/io/dapr/springboot/examples/producer/workflow/CustomerWorkflow.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ public WorkflowStub create() {
1717
Customer customer = ctx.getInput(Customer.class);
1818
customer.setWorkflowId(instanceId);
1919

20-
System.out.println("Registering customer: " + customer + " - hashcode" + this.hashCode());
21-
customer = ctx.callActivity(RegisterCustomerActivity.class.getName(), customer, Customer.class).await();
22-
System.out.println("Waiting for Customer " + customer + " feedback..."+ " - hashcode" + this.hashCode());
20+
ctx.callActivity(RegisterCustomerActivity.class.getName(), customer, Customer.class).await();
21+
2322
customer = ctx.waitForExternalEvent("CustomerReachOut", Duration.ofMinutes(5), Customer.class).await();
24-
System.out.println("Customer " + customer + " feedback received. Booking a follow up."+ " - hashcode" + this.hashCode());
23+
2524
customer = ctx.callActivity(CustomerFollowupActivity.class.getName(), customer, Customer.class).await();
26-
System.out.println("Customer " + customer + "acquired!"+ " - hashcode" + this.hashCode());
2725

2826
ctx.complete(customer);
2927
};

spring-boot-examples/producer-app/src/main/java/io/dapr/springboot/examples/producer/workflow/RegisterCustomerActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public RegisterCustomerActivity(CustomerStore customerStore) {
2020
public Object run(WorkflowActivityContext ctx) {
2121
Customer customer = ctx.getInput(Customer.class);
2222
customer.setInCustomerDB(true);
23-
System.out.println("Customer: " + customer + " registered." + " - hashcode" + this.hashCode());
23+
System.out.println("Customer: " + customer + " registered.");
2424
customerStore.addCustomer(customer);
2525
return customer;
2626
}

spring-boot-examples/producer-app/src/test/java/io/dapr/springboot/examples/producer/ProducerAppTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class ProducerAppTests {
3939
@BeforeEach
4040
void setUp() {
4141
RestAssured.baseURI = "http://localhost:" + 8080;
42+
org.testcontainers.Testcontainers.exposeHostPorts(8080);
4243
}
4344

4445

0 commit comments

Comments
 (0)