Keycloak的Spring Boot适配器与Jetty引起看似无关的异常(Keycloak's Spring Boot adapter with Jetty causing seemin

编程入门 行业动态 更新时间:2024-10-12 10:20:18
Keycloak的Spring Boot适配器与Jetty引起看似无关的异常(Keycloak's Spring Boot adapter with Jetty causing seemingly unrelated exceptions)

我在尝试使用Keycloak获得基于Jetty的小型Spring Boot应用程序时遇到了问题。

我正在关注后端部分的教程(跳过Angular特有的部分),但只要我包含keycloak-spring-boot-adapter我的应用程序就不会启动并抛出一些看起来不相关的keycloak-spring-boot-adapter 。 从堆栈跟踪看来,由于某些未知原因,自动配置无法解析ServletContext 。

我已经创建了一个我的应用程序的精简样本,我可以用它来重现这个问题。 它可以在GitHub上找到 。 清理克隆repo并调用mvn clean package && java -jar target/api-0.0.1-SNAPSHOT.war结果在自述文件中找到stacktrace。

有没有人有一个想法,为什么添加依赖borks我的自动配置?

I'm experiencing an issue whilst trying to secure a small Jetty-based Spring Boot application using Keycloak.

I'm following this tutorial for the backend part (skipping the Angular-specific bits), but as soon as I include the keycloak-spring-boot-adapter my application does not start and throws a couple of seemingly unrelated stacktraces. From the stacktraces it seems the autoconfiguration cannot resolve the ServletContext for some unknown reason.

I've created a stripped down sample of my application with which I'm able to reproduce the issue. It can be found on GitHub. Clean cloning the repo and calling mvn clean package && java -jar target/api-0.0.1-SNAPSHOT.war results in the stacktrace found in the README.

Has anyone got an idea why adding the dependency borks up my autoconfiguration?

最满意答案

这实际上是keycloak-spring-boot-adapter中的一个bug,为此我已经提交了一个bugreport和pull请求。

错误报告 PR

在撰写本文时,拉取请求尚未合并,但应该很快就会合并。

This is actually a bug in the keycloak-spring-boot-adapter, for which I've now filed a bugreport and pull request.

Bugreport PR

The pull request hasn't been merged at the time of writing, but it should be soon.

更多推荐

本文发布于:2023-08-07 18:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465348.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:适配器   异常   Jetty   Boot   Keycloak

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!