Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required

 
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: 17278
6
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic