aws / aws/serverless-java-container

Provide concrete example of building custom events

未關閉
#640 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
1.6k
分支
574
PR 合併指標
30 天內沒有已合併 PR

描述

*To help us debug your issue fill in the basic information below using the options provided*

*Serverless Java Container version*: `eg. 1.5`
v1 (Spring Boot 2) and v2 (Spring Boot 3.x)

*Implementations:* `Jersey / Spring / Spring Boot / Spring Boot 2 / Spark`
Spring Boot

*Framework version:* `eg SpringBoot 2.2.6.RELEASE`
Spring Boot 2.x and Spring Boot 3.x

*Frontend service:* `REST API / HTTP API / ALB`
VPC Lattice

*Deployment method:* `eg SAM, Serverless Framework, Console`
N/A

## Scenario
*Describe what you are trying to accomplish*
This is a more general ask related to this [issue](https://github.com/awslabs/aws-serverless-java-container/issues/639). The documentation provided [here](https://github.com/awslabs/aws-serverless-java-container/wiki/Custom-event-types) indicates that just four classes need to be implemented to build the custom class. However, pursuant of trying to implement the VPC Lattice event, I discovered that in addition to creating the POJOs for the event model itself, I needed to also implement `ExceptionHandler`, `SecurityContext`, `SecurityContextWriter`. It would helpful to include a practical example of how to create the custom event, outline the minimum and optional attributes for the servlet request, and how to set fields for the response payload.

## Expected behavior
*Describe how you would expect the application to behave*
Ability to simply or at least clear extend the framework with custom event payloads

## Actual behavior
*Describe what you are seeing instead*
Difficulty following the documentation

貢獻指南

開啟貢獻指南

研究方向

從現有的 Custom-event-types wiki 頁面和相關 issue 639 開始,然後將其中關於四個類別的指引與此處所述對 ExceptionHandler、SecurityContext 和 SecurityContextWriter 的額外需求進行比較。完成標準是文件包含一個實用的 custom-event 範例,指出 servlet-request 的最小屬性和可選屬性,並說明如何填入 response 欄位。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java, spring-boot
領域
documentation
Issue 類型
文件
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。