1@Transactional
2public interface SpecialEquipmentRepo extends AbstractRepository<SpecialEquipment,Long>{
3
4}
1@NoRepositoryBean
2public interface AbstractRepository<T extends AbstractEquipment>
3 extends CrudRepository<T, Long>{
4
5 @Query("select e from #{#entityName} as e from equipment where e.name = equipmentName")
6 T findEquipmentByName(String equipmentName);
7
8}