在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:awslabs/aws-serverless-java-container开源软件地址:https://github.com/awslabs/aws-serverless-java-container开源编程语言:Java 99.7%开源软件介绍:Serverless Java containerThe Serverless Java Container natively supports API Gateway's proxy integration models for requests and responses, you can create and inject custom models for methods that use custom mappings. Follow the quick start guides in our wiki to integrate Serverless Java Container with your project:
Below is the most basic AWS Lambda handler example that launches a Spring application. You can also take a look at the samples in this repository, our main wiki page includes a step-by-step guide on how to deploy the various sample applications using Maven and SAM. public class StreamLambdaHandler implements RequestStreamHandler {
private static SpringLambdaContainerHandler<AwsProxyRequest, AwsProxyResponse> handler;
static {
try {
handler = SpringLambdaContainerHandler.getAwsProxyHandler(PetStoreSpringAppConfig.class);
} catch (ContainerInitializationException e) {
// if we fail here. We re-throw the exception to force another cold start
e.printStackTrace();
throw new RuntimeException("Could not initialize Spring framework", e);
}
}
@Override
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
throws IOException {
handler.proxyStream(inputStream, outputStream, context);
}
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论