diff --git a/src/main/java/ru/redrise/marinesco/library/ParseThread.java b/src/main/java/ru/redrise/marinesco/library/ParseThread.java deleted file mode 100644 index 6298861..0000000 --- a/src/main/java/ru/redrise/marinesco/library/ParseThread.java +++ /dev/null @@ -1,19 +0,0 @@ -package ru.redrise.marinesco.library; - -import org.springframework.beans.factory.DisposableBean; - -public class ParseThread implements DisposableBean, Runnable{ - private static volatile boolean running; - - @Override - public void run() { - running = true; - // TODO Auto-generated method stub - - } - - @Override - public void destroy(){ - running = false; - } -} diff --git a/src/main/java/ru/redrise/marinesco/library/AuthorController.java b/src/main/java/ru/redrise/marinesco/library/web/AuthorController.java similarity index 90% rename from src/main/java/ru/redrise/marinesco/library/AuthorController.java rename to src/main/java/ru/redrise/marinesco/library/web/AuthorController.java index 0c30f07..4b1b793 100644 --- a/src/main/java/ru/redrise/marinesco/library/AuthorController.java +++ b/src/main/java/ru/redrise/marinesco/library/web/AuthorController.java @@ -1,4 +1,4 @@ -package ru.redrise.marinesco.library; +package ru.redrise.marinesco.library.web; import java.util.List; @@ -10,6 +10,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import ru.redrise.marinesco.data.AuthorRepository; import ru.redrise.marinesco.data.BookRepository; +import ru.redrise.marinesco.library.Author; +import ru.redrise.marinesco.library.Book; @Controller @RequestMapping("/author") diff --git a/src/main/java/ru/redrise/marinesco/library/BookController.java b/src/main/java/ru/redrise/marinesco/library/web/BookController.java similarity index 91% rename from src/main/java/ru/redrise/marinesco/library/BookController.java rename to src/main/java/ru/redrise/marinesco/library/web/BookController.java index cd5182c..9885d21 100644 --- a/src/main/java/ru/redrise/marinesco/library/BookController.java +++ b/src/main/java/ru/redrise/marinesco/library/web/BookController.java @@ -1,4 +1,4 @@ -package ru.redrise.marinesco.library; +package ru.redrise.marinesco.library.web; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import ru.redrise.marinesco.data.BookRepository; +import ru.redrise.marinesco.library.Book; @Controller @RequestMapping("/book") diff --git a/src/main/java/ru/redrise/marinesco/SearchController.java b/src/main/java/ru/redrise/marinesco/library/web/SearchController.java similarity index 91% rename from src/main/java/ru/redrise/marinesco/SearchController.java rename to src/main/java/ru/redrise/marinesco/library/web/SearchController.java index 0de70cb..5b15b38 100644 --- a/src/main/java/ru/redrise/marinesco/SearchController.java +++ b/src/main/java/ru/redrise/marinesco/library/web/SearchController.java @@ -1,4 +1,4 @@ -package ru.redrise.marinesco; +package ru.redrise.marinesco.library.web; import java.util.List; @@ -36,7 +36,7 @@ public class SearchController { List books = inpEntryRepository.findByTitleContainingIgnoreCase(search); model.addAttribute("books", books); - List bookSeries = inpEntryRepository.findByTitleContainingIgnoreCase(search); + List bookSeries = inpEntryRepository.findBySeriesContainingIgnoreCase(search); model.addAttribute("series", bookSeries); List authors = authorRepository.findByAuthorNameContainingIgnoreCase(search);