0

Right now I am working on some college project with Spring Boot and MySQL db, and I got this error in console for Service, Controller and Repository class of "Korisnik". Can't find solution on internet for now and still losing plenty of time on that.

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'korisnikService' defined in file [/home/sombor/Downloads/Book Your Flight/Book-Your-Flight/target/classes/com/bookyourflight/Book/Your/Flight/korisnik/KorisnikService.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'korisnikRepository' defined in com.bookyourflight.Book.Your.Flight.korisnik.KorisnikRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Not a managed type: class com.bookyourflight.Book.Your.Flight.korisnik.Korisnik

Tried to find solution on internet, expected to fix the problem.

Aleksso
  • 7
  • 3

1 Answers1

0

You have to add the @Entity annotation plus getters and setters.

@Entity
public class Korisnik {
 /*
   Getters and Setters...
 */
}
ocrowo
  • 26
  • 3