Skip to content

Commit 47d08a7

Browse files
author
Vadym Kazulkin
committed
improved readme
1 parent 9df81ea commit 47d08a7

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

spring-boot-3.2-docker-image-with-crac/src/main/java/software/amazonaws/example/product/handler/GetProductByIdHandler.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
package software.amazonaws.example.product.handler;
55

6-
import java.io.IOException;
7-
import java.nio.file.Files;
8-
import java.nio.file.Path;
96
import java.util.Optional;
107
import java.util.Properties;
118
import java.util.function.Function;
@@ -36,14 +33,6 @@ public class GetProductByIdHandler implements Function<APIGatewayProxyRequestEve
3633

3734
public APIGatewayProxyResponseEvent apply(APIGatewayProxyRequestEvent requestEvent) {
3835

39-
Path filePath = Path.of("/tmp/crac/dump4.log");
40-
try {
41-
String content = Files.readString(filePath);
42-
logger.info("crac dump" +content);
43-
} catch (IOException e) {
44-
logger.info("error reading dmup" +e.getMessage());
45-
}
46-
4736
Properties prop = System.getProperties();
4837
logger.info ("JVM Vendor : " + prop.getProperty("java.vendor") );
4938
String id = requestEvent.getPathParameters().get("id");

spring-boot-3.2-docker-image-with-crac/template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Globals:
1515
MemorySize: 1024
1616
Environment:
1717
Variables:
18-
JAVA_TOOL_OPTIONS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
18+
JAVA_TOOL_OPTIONS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dspring.context.checkpoint=onRefresh -XX:CRaCCheckpointTo=/tmp/crac"
1919
MAIN_CLASS: software.amazonaws.Application
2020
PRODUCT_TABLE_NAME: !Ref ProductsTable
2121

@@ -139,7 +139,7 @@ Resources:
139139
Type: AWS::Serverless::Function
140140
Properties:
141141
PackageType: Image
142-
ImageUri: !Sub ${AWS::AccountId}.dkr.ecr.eu-central-1.amazonaws.com/aws-spring-boot-3.2-java21-with-crac-custom-docker-image:v1
142+
ImageUri: !Sub ${AWS::AccountId}.dkr.ecr.eu-central-1.amazonaws.com/aws-spring-boot-3.2-java21-crac-custom-docker-image:v1
143143
ImageConfig:
144144
Command: ["org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest"]
145145
Environment:

0 commit comments

Comments
 (0)