|
|
@@ -1,10 +1,12 @@
|
|
|
package com.izouma.nineth.repo;
|
|
|
|
|
|
import com.izouma.nineth.domain.Recommend;
|
|
|
+import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
+import org.springframework.lang.NonNull;
|
|
|
|
|
|
import javax.transaction.Transactional;
|
|
|
|
|
|
@@ -13,4 +15,7 @@ public interface RecommendRepo extends JpaRepository<Recommend, Long>, JpaSpecif
|
|
|
@Modifying
|
|
|
@Transactional
|
|
|
void softDelete(Long id);
|
|
|
+
|
|
|
+ @CacheEvict(value = "recommend", allEntries = true)
|
|
|
+ Recommend save(@NonNull Recommend record);
|
|
|
}
|