Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

anna lobers
anna lobers
707 Points

CrudRepository unknown

I finished the User Authentication in spring course I am trying to making this for my own project. When I am trying to do the UserDao i always get an error on CrudRepository (cant resolve symbol). I have (or think i have) implemented all the same dependencies as we did in the course but it doesn't work

3 Answers

Corey Johnson
PLUS
Corey Johnson
Courses Plus Student 10,192 Points

Hello Anna,

Can you post some more info. Are you using Intellij? Also can you post the following:

  1. the code from your Dao object that extends CrudRepository
  2. your build.gradle file or pom.xml if you are using maven
  3. the full error/exception you are experiencing

Will do my best to help you.

anna lobers
anna lobers
707 Points

Hi, thank you. For some reason this all of a sudden worked. Now however i get this error message: Field userDao in UserServiceIml required a bean of type UserDao that could not be found. What does that mean?

I am using gradle and intellij.

Thomas Nilsen
Thomas Nilsen
14,957 Points

Could it be that you forgot to annotate the userDao with @Autowired?

anna lobers
anna lobers
707 Points

No, but i tried to take Autowired away and then i could run it