my spring mvc / security project can not initialize because there is a problem with the BCryptEncoder:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder]
The same code and environment (Intellij 2016, java 1.8, mySQL 5.7, tomcat 8, maven 3.3) works well on windows.
BCryptPasswordEncoder is called in my userService:
@Autowired
private BCryptPasswordEncoder bCryptPasswordEncoder;
BCryptPasswordEncoder is defined in my SecurityConfig:
@Bean
public PasswordEncoder passwordEncoder() {
PasswordEncoder encoder = new BCryptPasswordEncoder();
return encoder;
}
And in the pom.xml:
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>3.2.3.RELEASE</version>
</dependency>
If I navigate from Intellij to the definition of the class, I find it in my library folder.
I have no more clues. It is very strange that it works only in Windows and not in linux. Thanks in advance.