How to get rid of 'java.lang.IllegalArgumentException: Unknown entity' while running a simple hibernate app?

前端 未结 3 1089
天命终不由人
天命终不由人 2021-01-04 18:48

I am new to Hibernate. While creating a small app using it I got following exception:

Exception in thread \"main\" java.lang.IllegalArgumentException: Unknown entit

3条回答
  •  逝去的感伤
    2021-01-04 19:30

    I'm Trying this and it's working with me :

    Add @EntityScan( basePackages = {"com.yourpkghere"} to Application class. To be like this :

    @EntityScan( basePackages = {"com.yourpkghere"})
    @SpringBootApplication
    

提交回复
热议问题