File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
spring-boot-3.2-docker-image-with-crac
src/main/java/software/amazonaws/example/product/handler Expand file tree Collapse file tree 2 files changed +16
-2
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 ;
6
9
import java .util .Optional ;
7
10
import java .util .Properties ;
8
11
import java .util .function .Function ;
@@ -32,6 +35,17 @@ public class GetProductByIdHandler implements Function<APIGatewayProxyRequestEve
32
35
private static final Logger logger = LoggerFactory .getLogger (GetProductByIdHandler .class );
33
36
34
37
public APIGatewayProxyResponseEvent apply (APIGatewayProxyRequestEvent requestEvent ) {
38
+
39
+
40
+ Path filePath = Path .of ("/tmp/crac/dump4.log" );
41
+
42
+ try {
43
+ String content = Files .readString (filePath );
44
+ logger .info ("crac dump" +content );
45
+ } catch (IOException e ) {
46
+
47
+ }
48
+
35
49
Properties prop = System .getProperties ();
36
50
logger .info ("JVM Vendor : " + prop .getProperty ("java.vendor" ) );
37
51
String id = requestEvent .getPathParameters ().get ("id" );
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ Resources:
110
110
Type : AWS::Serverless::Function
111
111
Properties :
112
112
PackageType : Image
113
- ImageUri : !Sub ${AWS::AccountId}.dkr.ecr.eu-central-1.amazonaws.com/aws-spring-boot-3.2-java21-with- crac-custom-docker-image:v1
113
+ ImageUri : !Sub ${AWS::AccountId}.dkr.ecr.eu-central-1.amazonaws.com/aws-spring-boot-3.2-java21-crac-custom-docker-image:v1
114
114
ImageConfig :
115
115
Command : ["org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest"]
116
116
Environment :
@@ -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