Skip to content

Commit

Permalink
0.2.3.2 modified handler
Browse files Browse the repository at this point in the history
  • Loading branch information
cameroncaci committed Oct 18, 2023
1 parent 7a6837a commit fe76c15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>com.milmove.trdmlambda</groupId>
<artifactId>trdm-lambda</artifactId>
<version>0.2.3.1</version>
<version>0.2.3.2</version>
<name>trdm java spring interface</name>
<description>Project for deploying a Java RESTful interface for SOAP requests to TRDM.</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@
import java.io.InputStream;
import java.io.OutputStream;

import org.springframework.beans.factory.annotation.Autowired;

import com.amazonaws.serverless.exceptions.ContainerInitializationException;
import com.amazonaws.serverless.proxy.model.AwsProxyRequest;
import com.amazonaws.serverless.proxy.model.AwsProxyResponse;
import com.amazonaws.serverless.proxy.model.HttpApiV2ProxyRequest;
import com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestStreamHandler;

public class StreamLambdaHandler implements RequestStreamHandler {
@Autowired
private static SpringBootLambdaContainerHandler<AwsProxyRequest, AwsProxyResponse> handler;
private static SpringBootLambdaContainerHandler<HttpApiV2ProxyRequest, AwsProxyResponse> handler;
static {
try {
handler = SpringBootLambdaContainerHandler.getAwsProxyHandler(TrdmRestApplication.class);
handler = SpringBootLambdaContainerHandler.getHttpApiV2ProxyHandler(TrdmRestApplication.class);
// If you are using HTTP APIs with the version 2.0 of the proxy model, use the getHttpApiV2ProxyHandler
// method: handler = SpringBootLambdaContainerHandler.getHttpApiV2ProxyHandler(Application.class);
} catch (ContainerInitializationException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
Expand All @@ -19,7 +21,7 @@

import ch.qos.logback.classic.Logger;

@SpringBootApplication
@SpringBootApplication()
public class TrdmRestApplication {
private Logger logger = (Logger) LoggerFactory.getLogger(TrdmRestApplication.class);
@Autowired
Expand Down

0 comments on commit fe76c15

Please sign in to comment.