package linuschien.newsfeed.data.repository;

import linuschien.newsfeed.data.model.NewsContent;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

@RepositoryRestResource(collectionResourceRel = "contents", path = "contents")
public interface NewsContentRepository extends MongoRepository<NewsContent, String> {

}

@@ -37,24 +37,50 @@
 ository;%0D%0A%0D%0A
+import java.util.List;%0D%0A%0D%0A
 import linus
@@ -115,24 +115,24 @@
 wsContent;%0D%0A
-
 %0D%0Aimport org
@@ -190,16 +190,73 @@
 itory;%0D%0A
+import org.springframework.data.repository.query.Param;%0D%0A
 import o
@@ -407,16 +407,16 @@
 ents%22)%0D%0A
-
 public i
@@ -496,11 +496,76 @@
 g%3E %7B%0D%0A%0D%0A
+%09List%3CNewsContent%3E findByTitle(@Param(%22title%22) String title);%0D%0A%0D%0A
 %7D%0D%0A

add search sample