File tree 2 files changed +2
-13
lines changed
spring-boot-3.2-docker-image-with-crac
src/main/java/software/amazonaws/example/product/handler
2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 3
3
4
4
package software .amazonaws .example .product .handler ;
5
5
6
- import java .io .IOException ;
7
- import java .nio .file .Files ;
8
- import java .nio .file .Path ;
9
6
import java .util .Optional ;
10
7
import java .util .Properties ;
11
8
import java .util .function .Function ;
@@ -36,14 +33,6 @@ public class GetProductByIdHandler implements Function<APIGatewayProxyRequestEve
36
33
37
34
public APIGatewayProxyResponseEvent apply (APIGatewayProxyRequestEvent requestEvent ) {
38
35
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
-
47
36
Properties prop = System .getProperties ();
48
37
logger .info ("JVM Vendor : " + prop .getProperty ("java.vendor" ) );
49
38
String id = requestEvent .getPathParameters ().get ("id" );
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Globals:
15
15
MemorySize : 1024
16
16
Environment :
17
17
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 "
19
19
MAIN_CLASS : software.amazonaws.Application
20
20
PRODUCT_TABLE_NAME : !Ref ProductsTable
21
21
@@ -139,7 +139,7 @@ Resources:
139
139
Type : AWS::Serverless::Function
140
140
Properties :
141
141
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
143
143
ImageConfig :
144
144
Command : ["org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest"]
145
145
Environment :
You can’t perform that action at this time.
0 commit comments