Skip to content

Commit fee7a6d

Browse files
committed
fix: asyncInit() code sample (#391)
1 parent 18aa8a9 commit fee7a6d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

aws-serverless-springboot2-archetype/src/main/resources/archetype-resources/src/main/java/StreamLambdaHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ public class StreamLambdaHandler implements RequestStreamHandler {
1919
try {
2020
handler = SpringBootLambdaContainerHandler.getAwsProxyHandler(Application.class);
2121
// For applications that take longer than 10 seconds to start, use the async builder:
22-
// long startTime = Instant.now().toEpochMilli();
23-
// handler = new SpringBootProxyHandlerBuilder()
22+
// handler = new SpringBootProxyHandlerBuilder<AwsProxyRequest>()
2423
// .defaultProxy()
25-
// .asyncInit(startTime)
24+
// .asyncInit()
2625
// .springBootApplication(Application.class)
2726
// .buildAndInitialize();
2827
} catch (ContainerInitializationException e) {

samples/springboot2/pet-store/src/main/java/com/amazonaws/serverless/sample/springboot2/StreamLambdaHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ public class StreamLambdaHandler implements RequestStreamHandler {
2626
handler = SpringBootLambdaContainerHandler.getAwsProxyHandler(Application.class);
2727

2828
// For applications that take longer than 10 seconds to start, use the async builder:
29-
// long startTime = Instant.now().toEpochMilli();
30-
// handler = new SpringBootProxyHandlerBuilder()
29+
// handler = new SpringBootProxyHandlerBuilder<AwsProxyRequest>()
3130
// .defaultProxy()
32-
// .asyncInit(startTime)
31+
// .asyncInit()
3332
// .springBootApplication(Application.class)
3433
// .buildAndInitialize();
3534

0 commit comments

Comments
 (0)