Avoid a mistake when extending Spring Data Repository

A little stupid mistake of mine that cost me some time. My application context would not start due to java.lang.IllegalArgumentException: Not an managed type: class java.lang.Object My interface looked like this: public interface MyUserRepository<MyUser, Long> extends JpaRepository<MyUser, Long> The correct definition, omitting the generic duplication which causes the error: public interface MyUserRepository extends JpaRepository<MyUser, Long>

September 5, 2023 · 1 min · Jens