I am trying to make use of the BCrypt library that spring provides. I've looked up many tutorials, but for some odd reason, almost none of them attempt to show what the build.gradle file should contain to access them. Currently, I have this:
dependencies {
....
compile group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.0.8.RELEASE'
}
In my actual java file, I have this:
package project;
import org.springframework.security.config.annotation.web.configuration;
import org.springframework.security.crypto.password;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
}
However, I see these errors when I try to build:
error: cannot find symbol import org.springframework.security.config.annotation.web.configuration;
^
symbol: class configuration
location: package org.springframework.security.config.annotation.web
error: package org.springframework.security.crypto does not exist
import org.springframework.security.crypto.password;
error: cannot find symbol public class SecurityConfig extends WebSecurityConfigurerAdapter {
^
symbol: class WebSecurityConfigurerAdapter
error: cannot find symbol
public PasswordEncoder passwordEncoder() {
^
symbol: class PasswordEncoder
location: class SecurityConfig
Which dependencies am I missing and how can I find them when the tutorials leave them out?