aws / aws/serverless-java-container

ServletContextListener never invoked

未关闭
#505 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Java
星标
1.6k
派生
574
PR 合并指标
30 天内没有已合并 PR

描述

*Serverless Java Container version*: `1.9.1`

*Implementations:* `Spring Boot 2`

*Framework version:* `SpringBoot 2.7.5`

*Frontend service:* `HTTP API`

*Deployment method:* `SAM`

## Scenario
Hilla initializes some parts through a `ServletContextInitializer` that uses `servletContext.addListener` to add a `ServletContextListener` to the context. The actual initialization then takes place in the `ServletContextListener`. The problem is that the `addListener` method of `AwsServletContext` is empty.

Not sure where the correct place would be to invoke the listener. It seems to happen to work if I invoke the listener immediately.

## Expected behavior
The added listener is called

## Actual behavior
The added listener is ignored

贡献指南

打开贡献指南

调研方向

Start by inspecting AwsServletContext.addListener and the ServletContextInitializer and ServletContextListener lifecycle described in the issue. Trace how the AWS servlet context is created and determine where the registered listener should be invoked. Done means an added ServletContextListener is called during initialization without breaking the Spring Boot serverless startup path.

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

评估

技术栈
aws, java, spring-boot
领域
api, backend, cloud
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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