Fix find-by-series function on search page
This commit is contained in:
parent
45f4e802d2
commit
c66bf41d72
4 changed files with 7 additions and 23 deletions
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.redrise.marinesco.library;
|
package ru.redrise.marinesco.library.web;
|
||||||
|
|
||||||
import java.util.List;
|
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.AuthorRepository;
|
||||||
import ru.redrise.marinesco.data.BookRepository;
|
import ru.redrise.marinesco.data.BookRepository;
|
||||||
|
import ru.redrise.marinesco.library.Author;
|
||||||
|
import ru.redrise.marinesco.library.Book;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/author")
|
@RequestMapping("/author")
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.redrise.marinesco.library;
|
package ru.redrise.marinesco.library.web;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
|
@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import ru.redrise.marinesco.data.BookRepository;
|
import ru.redrise.marinesco.data.BookRepository;
|
||||||
|
import ru.redrise.marinesco.library.Book;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/book")
|
@RequestMapping("/book")
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.redrise.marinesco;
|
package ru.redrise.marinesco.library.web;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class SearchController {
|
||||||
List<Book> books = inpEntryRepository.findByTitleContainingIgnoreCase(search);
|
List<Book> books = inpEntryRepository.findByTitleContainingIgnoreCase(search);
|
||||||
model.addAttribute("books", books);
|
model.addAttribute("books", books);
|
||||||
|
|
||||||
List<Book> bookSeries = inpEntryRepository.findByTitleContainingIgnoreCase(search);
|
List<Book> bookSeries = inpEntryRepository.findBySeriesContainingIgnoreCase(search);
|
||||||
model.addAttribute("series", bookSeries);
|
model.addAttribute("series", bookSeries);
|
||||||
|
|
||||||
List<Author> authors = authorRepository.findByAuthorNameContainingIgnoreCase(search);
|
List<Author> authors = authorRepository.findByAuthorNameContainingIgnoreCase(search);
|
Loading…
Reference in a new issue