简体   繁体   English

配置Spring安全性

[英]Configuring Spring security

Comparing to working version of my Spring application I've only added Spring Security plugin to gradle.build 与我的Spring应用程序的工作版本相比,我仅向gradle.build添加了Spring Security插件。
compile('org.springframework.boot:spring-boot-starter-security')
and used org.springframework.security.crypto.bcrypt.BCrypt within one of my classes. 在我的一个课程中使用了org.springframework.security.crypto.bcrypt.BCrypt Now I'm getting " Full authentication is required to access this resource ". 现在,我得到“ 访问此资源需要完全身份验证 ”。 How to fix this problem or how to exclude all Spring Security features except BCrypt (second is more preferable)? 如何解决这个问题,或者如何排除除BCrypt之外的所有Spring Security功能(最好使用第二个功能)?

In spring boot, adding this dependency normally enables the OAuth 2 security configuration and its common to get the Full authentication error. 在春季启动中,添加此依赖关系通常会启用OAuth 2安全配置及其公共设置,以获取完全身份验证错误。 You can just add the Crypto dependency instead and try. 您可以只添加Crypto依赖项,然后尝试。
Maven: Maven:

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-crypto</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>

Gradle: 摇篮:

compile('org.springframework.security:spring-security-crypto:4.0.1.RELEASE')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM