Spring Cloud OAuth2(一) 搭建授权服务
原文出处: http://www.cnblogs.com/fp2952/p/8973613.html 概要 本文内容主要为spring cloud 授权服务的搭建,采用jwt认证。 GitHub 地址: https://github.com/fp2952/spring-cloud-base/tree/master/auth-center/auth-center-provider 添加依赖 Spring Security 及 Security 的OAuth2 扩展 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-oauth2</artifactId> </dependency> 启动类注解 启动类添加 @EnableAuthorizationServer 注解 @SpringCloudApplication @EnableAuthorizationServer @EnableFeignClients(