简体   繁体   English

与 (react, spring boot, postgres) 一起使用的 keycloak 版本

[英]keycloak version to use with (react, spring boot, postgres)

what is the best version of keycloak to use with spring boot as backend and react as frontend and I can setup easily with a postgres database, I've tested the latest version 19.0.1 but I couldn't set it up with react and spring boot and it doesn't take the postgres DB I specified in env variables.与 spring 启动作为后端并作为前端反应的最佳密钥斗篷版本是什么,我可以使用 postgres 数据库轻松设置,我已经测试了最新版本 19.0.1,但我无法使用 react 和 spring 进行设置启动并且它不需要我在环境变量中指定的 postgres DB。

can you please suggest me the best version to use and some tutorials, videos or articles to learn more about it and how to implement it in production.您能否建议我使用最好的版本以及一些教程、视频或文章,以了解有关它的更多信息以及如何在生产中实现它。

thanks in advance.提前致谢。

I'd recomend using the keycloak-spring-boot-starter.我建议使用 keycloak-spring-boot-starter。 Here is an article on how to set it up: https://www.baeldung.com/spring-boot-keycloak这是一篇关于如何设置它的文章: https://www.baeldung.com/spring-boot-keycloak

I would also recomend to always use the most recent version.我还建议始终使用最新版本。 Especially for a security tool like keycloak.特别是对于像 keycloak 这样的安全工具。 If it doesn't work with the tutorial just set it up in the version the tutorial references and then migrate to a newer version step by step using migration guides.如果它不适用于教程,只需在教程引用的版本中设置它,然后使用迁移指南逐步迁移到更新的版本。

I recommand you don't use Keycloak Spring adapters , it is deprecated .我建议您不要使用 Keycloak Spring 适配器它已被弃用

The latest Keycloak version works perfectly.最新的 Keycloak 版本完美运行。 Maybe you just misconfigured or use the wrong libs.也许您只是配置错误或使用了错误的库。

For client (react app), pick a library from certified list对于客户端(反应应用程序),从认证列表中选择一个库

For resource-server (Spring REST API), use either:对于资源服务器(Spring REST API),使用:

Regarding the connection to Postgres, maybe should you return to the doc and read more carefully.关于与 Postgres 的连接,也许您应该返回文档并更仔细地阅读。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM