pig4cloud 对 Spring Security OAtuh2
的资源服务器配置进行了封装,只需要一个注解即可完成相关的操作
引入 pom
<!--安全模块-->
<dependency>
<groupId>com.pig4cloud</groupId>
<artifactId>pig-common-security</artifactId>
<version>laster.version</version>
</dependency>
main 方法开启 @EnablePigResourceServer
@EnablePigResourceServer
@EnablePigFeignClients
@SpringCloudApplication
public class PigAdminApplication {
public static void main(String[] args) {
SpringApplication.run(PigAdminApplication.class, args);
}
}