初步建立了NewsRepository

This commit is contained in:
高子兴 2024-07-03 11:06:54 +08:00
parent 2505b63b88
commit f9a6a3c481

View File

@ -0,0 +1,19 @@
package org.cmh.backend.NewsManagement.repository;
import org.cmh.backend.NewsManagement.model.News;
import org.springframework.data.jpa.repository.JpaRepository;
public interface NewsRepository extends JpaRepository<News, Long> {
News findByTitle(String title);
News findBySummary(String summary);
News findByAuthor(String author);
News findByImagePath(String imagePath);
News findByContent(String content);
News findByTitleAndSummaryAndAuthorAndImagePath(String title, String summary, String author, String imagePath);
}