我在尝试使用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.
更多推荐
发布评论