[英]Spring Boot Hibernate JPA mapping composite primary key gives IllegalArgumentException: This class does not define an IdClass
我為實體UserActivity配置了復合主鍵,如下所示,其中包含msisdn和extReferenceId上的復合鍵。 兩者都在我的實體中用@Id注釋。 IdClass是UserActivityId,它也如下注釋。 當我啟動Spring Boot應用程序時,它失敗並顯示錯誤: ...