how to stop extending jpa repository to every class in java code example
Example 1: how to stop extending jpa repository to every class in java
@Repository
public interface GenericDao extends Dao<JpaObject> {
}
Example 2: how to stop extending jpa repository to every class in java
@NoRepositoryBean
public interface Dao<T extends JpaObject> extends JpaRepository<T, Long> {
}
Example 3: how to stop extending jpa repository to every class in java
@MappedSuperclass
public class JpaObject {
@Id
@GeneratedValue
private Long id;
(.... created, last updated, general stuff here....)
}
Example 4: how to stop extending jpa repository to every class in java
public interface JpaRepository<T extends Serializable, ID extends Serializable> {
public <S extends T> S save(S object);
}