Provide concrete example of building custom events

Offen
#640 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
java, spring-boot
Bereich
documentation

Rechercherichtung

Beginne mit der bestehenden Custom-event-types-Wiki-Seite und dem zugehörigen Issue 639 und vergleiche dann deren Anleitung zu vier Klassen mit den zusätzlichen Anforderungen an ExceptionHandler, SecurityContext und SecurityContextWriter, die hier beschrieben werden. Als erledigt gilt die Aufgabe, wenn die Dokumentation ein praktisches custom-event-Beispiel enthält, die erforderlichen minimalen und optionalen servlet-request-Attribute benennt und erklärt, wie response-Felder befüllt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Java
Sterne
1.6k
Forks
575
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aws/serverless-java-container

Alle Issues in aws/serverless-java-container

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.