如何使用Spring Boot保护REST服务(OAuth)?
最接近的方案是: http://spring.io/guides/gs/securing-web/ http://spring.io/guides/gs/authenticating-ldap/
最接近的方案是: http://spring.io/guides/gs/securing-web/ http://spring.io/guides/gs/authenticating-ldap/
OAuth2AuthenticationProcessingFilter
添加到Spring Boot应用程序中。最接近的示例可能是spring-boot-sample-secure
,因为它明确添加了一个WebSecurityConfigurerAdapter
,这就是您需要做的。目前Spring Boot还没有针对OAuth的原生自动配置支持(但请随意添加)。这在路线图上,但除非更多的人要求,否则不太可能得到足够的关注。<oauth:authorization-server/>
和所有依赖项(例如来自香草sparklr2示例)。 - Dave SyerApplicationContext
中,我认为它们会共享bean,因此理论上不应该出现问题。您能否更具体地描述错误信息(我认为您指的不是“authorizationmanager”,但我只能猜测您实际上指的是什么)。 - Dave Syer