• Post Reply Bookmark Topic Watch Topic
  • New Topic

IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required  RSS feed

 
Dan King
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe I've properly configured my data source, however, I continually get the following error:
Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required

Below is my bean declaration and class, anyone see what is/could be wrong?

Note: JdbcDaoImpl has it's own dataSource and jdbcTemplate properties and getters/setters
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So it seems to need a JDBCTemplate passed in to it, just like you did with the dataSource. Just create a bean with JDBCTemplate passing dataSource in to a contructor-arg. Then inject the jdbcTemplate into the UserDetailsService bean there.

Mark
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!