package org.xmx0632.deliciousfruit.repository; import java.util.List; import javax.persistence.QueryHint; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.QueryHints; import org.springframework.data.repository.PagingAndSortingRepository; import org.xmx0632.deliciousfruit.entity.FruitStory; public interface FruitStoryDao extends PagingAndSortingRepository<FruitStory, Long>, JpaSpecificationExecutor<FruitStory> { @Query("from FruitStory f where f.status = ?1") @QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value = "true") }) List<FruitStory> findAllFruitStoryByStatus(String status); }