diff --git a/src/main/java/com/example/demo/BlogPostController.java b/src/main/java/com/example/demo/controller/BlogPostController.java similarity index 91% rename from src/main/java/com/example/demo/BlogPostController.java rename to src/main/java/com/example/demo/controller/BlogPostController.java index f76c4eab1..00c752bba 100644 --- a/src/main/java/com/example/demo/BlogPostController.java +++ b/src/main/java/com/example/demo/controller/BlogPostController.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.controller; +import com.example.demo.service.BlogPostService; +import com.example.demo.models.BlogPost; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/com/example/demo/RecipeController.java b/src/main/java/com/example/demo/controller/RecipeController.java similarity index 91% rename from src/main/java/com/example/demo/RecipeController.java rename to src/main/java/com/example/demo/controller/RecipeController.java index 0a40234b9..15bb6671f 100644 --- a/src/main/java/com/example/demo/RecipeController.java +++ b/src/main/java/com/example/demo/controller/RecipeController.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.controller; +import com.example.demo.service.RecipeService; +import com.example.demo.models.Recipe; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/com/example/demo/TagController.java b/src/main/java/com/example/demo/controller/TagController.java similarity index 91% rename from src/main/java/com/example/demo/TagController.java rename to src/main/java/com/example/demo/controller/TagController.java index bcafe7c19..102aa95a6 100644 --- a/src/main/java/com/example/demo/TagController.java +++ b/src/main/java/com/example/demo/controller/TagController.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.controller; +import com.example.demo.service.TagService; +import com.example.demo.models.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/com/example/demo/UserController.java b/src/main/java/com/example/demo/controller/UserController.java similarity index 91% rename from src/main/java/com/example/demo/UserController.java rename to src/main/java/com/example/demo/controller/UserController.java index 0494339c7..92601da95 100644 --- a/src/main/java/com/example/demo/UserController.java +++ b/src/main/java/com/example/demo/controller/UserController.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.controller; +import com.example.demo.service.UserService; +import com.example.demo.models.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/src/main/java/com/example/demo/BlogPost.java b/src/main/java/com/example/demo/models/BlogPost.java similarity index 96% rename from src/main/java/com/example/demo/BlogPost.java rename to src/main/java/com/example/demo/models/BlogPost.java index 8ade60fbd..bf54504f6 100644 --- a/src/main/java/com/example/demo/BlogPost.java +++ b/src/main/java/com/example/demo/models/BlogPost.java @@ -1,4 +1,4 @@ -package com.example.demo; +package com.example.demo.models; import javax.persistence.Entity; diff --git a/src/main/java/com/example/demo/Recipe.java b/src/main/java/com/example/demo/models/Recipe.java similarity index 97% rename from src/main/java/com/example/demo/Recipe.java rename to src/main/java/com/example/demo/models/Recipe.java index fce1c9996..7c1a8d701 100644 --- a/src/main/java/com/example/demo/Recipe.java +++ b/src/main/java/com/example/demo/models/Recipe.java @@ -1,4 +1,4 @@ -package com.example.demo; +package com.example.demo.models; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/src/main/java/com/example/demo/Tag.java b/src/main/java/com/example/demo/models/Tag.java similarity index 94% rename from src/main/java/com/example/demo/Tag.java rename to src/main/java/com/example/demo/models/Tag.java index 644408ffa..9a051433d 100644 --- a/src/main/java/com/example/demo/Tag.java +++ b/src/main/java/com/example/demo/models/Tag.java @@ -1,4 +1,4 @@ -package com.example.demo; +package com.example.demo.models; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/src/main/java/com/example/demo/User.java b/src/main/java/com/example/demo/models/User.java similarity index 96% rename from src/main/java/com/example/demo/User.java rename to src/main/java/com/example/demo/models/User.java index ab979c798..7bea354cb 100644 --- a/src/main/java/com/example/demo/User.java +++ b/src/main/java/com/example/demo/models/User.java @@ -1,4 +1,4 @@ -package com.example.demo; +package com.example.demo.models; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/src/main/java/com/example/demo/BlogPostRepository.java b/src/main/java/com/example/demo/repository/BlogPostRepository.java similarity index 64% rename from src/main/java/com/example/demo/BlogPostRepository.java rename to src/main/java/com/example/demo/repository/BlogPostRepository.java index 1b8624e93..ee78ab0ff 100644 --- a/src/main/java/com/example/demo/BlogPostRepository.java +++ b/src/main/java/com/example/demo/repository/BlogPostRepository.java @@ -1,5 +1,6 @@ -package com.example.demo; +package com.example.demo.repository; +import com.example.demo.models.BlogPost; import org.springframework.data.repository.CrudRepository; public interface BlogPostRepository extends CrudRepository { diff --git a/src/main/java/com/example/demo/RecipeRepository.java b/src/main/java/com/example/demo/repository/RecipeRepository.java similarity index 50% rename from src/main/java/com/example/demo/RecipeRepository.java rename to src/main/java/com/example/demo/repository/RecipeRepository.java index 0410b18c0..23a97f3ab 100644 --- a/src/main/java/com/example/demo/RecipeRepository.java +++ b/src/main/java/com/example/demo/repository/RecipeRepository.java @@ -1,8 +1,7 @@ -package com.example.demo; +package com.example.demo.repository; -import org.springframework.beans.factory.annotation.Autowired; +import com.example.demo.models.Recipe; import org.springframework.data.repository.CrudRepository; -import org.springframework.stereotype.Service; public interface RecipeRepository extends CrudRepository { diff --git a/src/main/java/com/example/demo/TagRepository.java b/src/main/java/com/example/demo/repository/TagRepository.java similarity index 64% rename from src/main/java/com/example/demo/TagRepository.java rename to src/main/java/com/example/demo/repository/TagRepository.java index dd217c9f4..28768ba9e 100644 --- a/src/main/java/com/example/demo/TagRepository.java +++ b/src/main/java/com/example/demo/repository/TagRepository.java @@ -1,5 +1,6 @@ -package com.example.demo; +package com.example.demo.repository; +import com.example.demo.models.Tag; import org.springframework.data.repository.CrudRepository; public interface TagRepository extends CrudRepository { diff --git a/src/main/java/com/example/demo/UserRepository.java b/src/main/java/com/example/demo/repository/UserRepository.java similarity index 63% rename from src/main/java/com/example/demo/UserRepository.java rename to src/main/java/com/example/demo/repository/UserRepository.java index 2d5a36aac..3dfde2416 100644 --- a/src/main/java/com/example/demo/UserRepository.java +++ b/src/main/java/com/example/demo/repository/UserRepository.java @@ -1,7 +1,7 @@ -package com.example.demo; +package com.example.demo.repository; +import com.example.demo.models.User; import org.springframework.data.repository.CrudRepository; -import org.springframework.stereotype.Repository; public interface UserRepository extends CrudRepository { } diff --git a/src/main/java/com/example/demo/BlogPostService.java b/src/main/java/com/example/demo/service/BlogPostService.java similarity index 89% rename from src/main/java/com/example/demo/BlogPostService.java rename to src/main/java/com/example/demo/service/BlogPostService.java index 20933910e..99fb80535 100644 --- a/src/main/java/com/example/demo/BlogPostService.java +++ b/src/main/java/com/example/demo/service/BlogPostService.java @@ -1,10 +1,11 @@ -package com.example.demo; +package com.example.demo.service; +import com.example.demo.models.BlogPost; +import com.example.demo.repository.BlogPostRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; @Service diff --git a/src/main/java/com/example/demo/RecipeService.java b/src/main/java/com/example/demo/service/RecipeService.java similarity index 90% rename from src/main/java/com/example/demo/RecipeService.java rename to src/main/java/com/example/demo/service/RecipeService.java index 83c525ec0..acef80734 100644 --- a/src/main/java/com/example/demo/RecipeService.java +++ b/src/main/java/com/example/demo/service/RecipeService.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.service; +import com.example.demo.models.Recipe; +import com.example.demo.repository.RecipeRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/example/demo/TagService.java b/src/main/java/com/example/demo/service/TagService.java similarity index 88% rename from src/main/java/com/example/demo/TagService.java rename to src/main/java/com/example/demo/service/TagService.java index 5e8f9c8d4..dd611efbf 100644 --- a/src/main/java/com/example/demo/TagService.java +++ b/src/main/java/com/example/demo/service/TagService.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.service; +import com.example.demo.models.Tag; +import com.example.demo.repository.TagRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/example/demo/UserService.java b/src/main/java/com/example/demo/service/UserService.java similarity index 89% rename from src/main/java/com/example/demo/UserService.java rename to src/main/java/com/example/demo/service/UserService.java index 1b4b5395a..589edc073 100644 --- a/src/main/java/com/example/demo/UserService.java +++ b/src/main/java/com/example/demo/service/UserService.java @@ -1,5 +1,7 @@ -package com.example.demo; +package com.example.demo.service; +import com.example.demo.models.User; +import com.example.demo.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;