From 5fabe70b8acac154b1e820ac8ebe05b7c3f489b3 Mon Sep 17 00:00:00 2001 From: DOHA Date: Fri, 2 Aug 2019 14:35:36 +0300 Subject: [PATCH] move upload files code to new package --- .../baeldung/mongodb/{ => file}/daos/PhotoRepository.java | 4 ++-- .../java/com/baeldung/mongodb/{ => file}/models/Photo.java | 2 +- .../java/com/baeldung/mongodb/{ => file}/models/Video.java | 2 +- .../baeldung/mongodb/{ => file}/services/PhotoService.java | 6 +++--- .../baeldung/mongodb/{ => file}/services/VideoService.java | 4 ++-- .../baeldung/mongodb/{ => file}/web/PhotoController.java | 6 +++--- .../baeldung/mongodb/{ => file}/web/VideoController.java | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/daos/PhotoRepository.java (62%) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/models/Photo.java (95%) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/models/Video.java (93%) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/services/PhotoService.java (83%) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/services/VideoService.java (94%) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/web/PhotoController.java (90%) rename persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/{ => file}/web/VideoController.java (92%) diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/daos/PhotoRepository.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/daos/PhotoRepository.java similarity index 62% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/daos/PhotoRepository.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/daos/PhotoRepository.java index d38e11c055..dc18df7b0a 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/daos/PhotoRepository.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/daos/PhotoRepository.java @@ -1,8 +1,8 @@ -package com.baeldung.mongodb.daos; +package com.baeldung.mongodb.file.daos; import org.springframework.data.mongodb.repository.MongoRepository; -import com.baeldung.mongodb.models.Photo; +import com.baeldung.mongodb.file.models.Photo; public interface PhotoRepository extends MongoRepository { diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/models/Photo.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/models/Photo.java similarity index 95% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/models/Photo.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/models/Photo.java index 13f1a3cd19..afb79b4dbb 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/models/Photo.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/models/Photo.java @@ -1,4 +1,4 @@ -package com.baeldung.mongodb.models; +package com.baeldung.mongodb.file.models; import org.bson.types.Binary; import org.springframework.data.annotation.Id; diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/models/Video.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/models/Video.java similarity index 93% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/models/Video.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/models/Video.java index 617f0cdbfd..9e60fd1746 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/models/Video.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/models/Video.java @@ -1,4 +1,4 @@ -package com.baeldung.mongodb.models; +package com.baeldung.mongodb.file.models; import java.io.InputStream; diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/services/PhotoService.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/services/PhotoService.java similarity index 83% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/services/PhotoService.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/services/PhotoService.java index d8d7541c76..8d0313b280 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/services/PhotoService.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/services/PhotoService.java @@ -1,4 +1,4 @@ -package com.baeldung.mongodb.services; +package com.baeldung.mongodb.file.services; import java.io.IOException; @@ -8,8 +8,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; -import com.baeldung.mongodb.daos.PhotoRepository; -import com.baeldung.mongodb.models.Photo; +import com.baeldung.mongodb.file.daos.PhotoRepository; +import com.baeldung.mongodb.file.models.Photo; @Service public class PhotoService { diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/services/VideoService.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/services/VideoService.java similarity index 94% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/services/VideoService.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/services/VideoService.java index ade1f7c73a..e4d3237bb1 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/services/VideoService.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/services/VideoService.java @@ -1,4 +1,4 @@ -package com.baeldung.mongodb.services; +package com.baeldung.mongodb.file.services; import java.io.IOException; @@ -11,7 +11,7 @@ import org.springframework.data.mongodb.gridfs.GridFsTemplate; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; -import com.baeldung.mongodb.models.Video; +import com.baeldung.mongodb.file.models.Video; import com.mongodb.BasicDBObject; import com.mongodb.DBObject; import com.mongodb.client.gridfs.model.GridFSFile; diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/web/PhotoController.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/web/PhotoController.java similarity index 90% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/web/PhotoController.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/web/PhotoController.java index 4d5746f0d8..55de8ffd1d 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/web/PhotoController.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/web/PhotoController.java @@ -1,4 +1,4 @@ -package com.baeldung.mongodb.web; +package com.baeldung.mongodb.file.web; import java.io.IOException; import java.util.Base64; @@ -12,8 +12,8 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; -import com.baeldung.mongodb.models.Photo; -import com.baeldung.mongodb.services.PhotoService; +import com.baeldung.mongodb.file.models.Photo; +import com.baeldung.mongodb.file.services.PhotoService; @Controller public class PhotoController { diff --git a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/web/VideoController.java b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/web/VideoController.java similarity index 92% rename from persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/web/VideoController.java rename to persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/web/VideoController.java index 313ce9e650..cbe8c5d7da 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/web/VideoController.java +++ b/persistence-modules/spring-boot-persistence-mongodb/src/main/java/com/baeldung/mongodb/file/web/VideoController.java @@ -1,4 +1,4 @@ -package com.baeldung.mongodb.web; +package com.baeldung.mongodb.file.web; import java.io.IOException; @@ -14,8 +14,8 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; -import com.baeldung.mongodb.models.Video; -import com.baeldung.mongodb.services.VideoService; +import com.baeldung.mongodb.file.models.Video; +import com.baeldung.mongodb.file.services.VideoService; @Controller public class VideoController {