Provide concrete example of building custom events

未关闭
#640 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
java, spring-boot
领域
documentation

调研方向

从现有的 Custom-event-types wiki 页面和相关 issue 639 开始,然后将其中关于四个类的指导与此处描述的对 ExceptionHandler、SecurityContext 和 SecurityContextWriter 的额外要求进行比较。完成标准是文档包含一个实用的 custom-event 示例,指出 servlet-request 的最小属性和可选属性,并解释如何填充 response 字段。

由索引模型根据 Issue 内容生成。

描述

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. The documentation provided here 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

主要语言
Java
星标
1.6k
派生
575
平均合并
1 天 15 小时
30 天内合并 PR
12

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/serverless-java-container 的其他 Issue

查看 aws/serverless-java-container 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。