Spring Security 授权接口:org.springframework.security.core.GrantedAuthority
org.springframework.security.core.GrantedAuthority 接口是 Spring Security 框架中的一个核心接口,用于表示授权信息。在项目中使用该接口,需要添加 Spring Security 的依赖。具体依赖版本可以根据项目的需求进行选择。
例如,若使用 Maven 作为项目构建工具,则可以在 pom.xml 文件中添加以下依赖:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.3.4.RELEASE</version>
</dependency>
这将会引入 Spring Security 5.3.4.RELEASE 版本的核心依赖,包括 org.springframework.security.core.GrantedAuthority 接口。
原文地址: https://www.cveoy.top/t/topic/nBj8 著作权归作者所有。请勿转载和采集!