我们正在使用具有以下属性的 spring boot 1 oauth。
security.oauth2.resource.jwt.key-uri
spring boot2 中缺少它,有什么替代品吗?
最佳答案
我在 gitter chat 中问过同样的问题.
戴夫赛尔说:
Those features were removed. They are migrating to Spring Security. But slowly. The plan is to have a shim jar that you can use in the transition period. but that's not done yet @rwinch said he was going to publish something after Spring One (i.e. next week earliest)
所以还没有替代品。他们从 spring-boot 中删除了一些资源服务器自动配置。他们还没有将它添加回 spring-security。但这很快就会到来。
所以你现在所能做的就是从 spring-boot 1.5 中复制所需的代码。
编辑
与此同时,有一个项目可以帮助您在 spring-boot 2 中获得 spring-security-oauth 自动配置 - 请参阅 https://github.com/spring-projects/spring-security-oauth2-boot
另请参阅 spring boot 1.5->2.0 迁移指南 - https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#oauth2
关于spring-boot - spring boot 2 中 jwt.key-uri 的替代品是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47711295/