spring doesnt see my repo class as a bean
hey guys. so i have my service class:
and a repo class:
but when i start my app, i get an error:
and the thing is that i have all the needed annotations. can smb take a look? thx
16 Replies
⌛
This post has been reserved for your question.
Hey @bambyzas! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
What's the package where the main method resides?
Also your repo is wrong
You're missing a distance parameter
its
lt.brilingas.tieto
That should work. Hmm
whats a distance param? i tried googling but found nothing specific
do i need to have a config class of some sort?
No you shouldn't
Show me the application class
That's fine
Is there anything else in your log
Because that repository is broken and might be why it's not found
You're doing byDistanceAndSeason
JPA rules state you need a second parameter then
Which ide do you use?
Community or pro?
List<Item> getAllByDistanceAndSeason(String distance, String season);
That's what it should be
I use string but use whatever datatype it actually is
intellij idea pro
fml. i totally forgot haha. but that also didnt do stuff
Yeah it highlights it for you
i forgor to config my db in app.properties. i have this
do i need to add smth more?
Don't have to add the last one
Just the first 3 is fine
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.