패키지 구성 기본 뼈대
- repository
-- <entity 명칭>
예시
@Repository
public interface PostEntityRepository extends JpaRepository<PostEntity, Integer> {
Page<PostEntity> findAllByUser(UserEntity entity, Pageable pageable);
@Transactional
@Modifying
@Query("UPDATE PostEntity entity SET deleted_at = NOW() where entity.id = :post")
void deletePost(@Param("post") Integer postEntity);
}
댓글