Skip to content
Permalink
Browse files

Added data repositories

  • Loading branch information...
borabilgin committed Jan 24, 2019
1 parent 1aeb885 commit 6bbf05c27b182681ed73dc99ee9075b438399a5b
@@ -0,0 +1,8 @@
package com.demo.imagebrowser.repository;

import com.demo.imagebrowser.domain.FeedCategory;
import org.springframework.data.repository.CrudRepository;

public interface FeedCategoryRepository extends CrudRepository<FeedCategory, Long> {
FeedCategory findByName(String name);
}
@@ -0,0 +1,11 @@
package com.demo.imagebrowser.repository;

import com.demo.imagebrowser.domain.Feed;
import com.demo.imagebrowser.domain.FeedCategory;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface FeedRepository extends CrudRepository<Feed, Long> {
List<Feed> findByCategory(FeedCategory category);
}
@@ -0,0 +1,11 @@
package com.demo.imagebrowser.repository;

import com.demo.imagebrowser.domain.User;
import org.springframework.data.repository.CrudRepository;

public interface UserRepository extends CrudRepository<User, Long> {
User findByUsername(String username);
}



0 comments on commit 6bbf05c

Please sign in to comment.
You can’t perform that action at this time.