This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

passwordEncoder with spring security  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<sec:authentication-manager alias="authenticationManager">
   <sec:authentication-provider ref="limitLoginAuthenticationProvider" >
       <sec:password-encoder ref="passwordEncoder" />
<bean id="limitLoginAuthenticationProvider" class="">
   <property name="userDetailsService" ref="userDetailsService" />
   <property name="userDetailsLoginAttemptsDao" ref="userDetailsLoginAttemptsDao" />
<bean id="passwordEncoder" class="" />

spring security 5 i am using i getting error with this :nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: authentication-provider element cannot have child elements when used with 'ref' attribute  
please give the solution for this any one
Posts: 502
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We'll need a bit more information then a xml snippet...

Speaking of xml, why not using springBoot?
Posts: 9493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception says exactly what's wrong. You can't specify a PasswordEncoder if your authentication-provider element references a custom provider.

Can you specify the password encoder inside the custom authentication provider bean?
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Download Free Java APIs to Work with Office Files and PDF
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!