Compare commits
No commits in common. "c66bf41d7278c1da655e9ddcb357cd78c845c370" and "218fa6553e3c0e167484f27487438e4309acd638" have entirely different histories.
c66bf41d72
...
218fa6553e
5 changed files with 24 additions and 8 deletions
|
@ -18,7 +18,7 @@ services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres
|
||||||
volumes:
|
volumes:
|
||||||
- ./files/postgresql/data:/var/lib/postgresql/data
|
- ./files/postgresql:/var/lib/postgresql
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=mari
|
- POSTGRES_USER=mari
|
||||||
- POSTGRES_PASSWORD=example
|
- POSTGRES_PASSWORD=example
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.redrise.marinesco.library.web;
|
package ru.redrise.marinesco;
|
||||||
|
|
||||||
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.findBySeriesContainingIgnoreCase(search);
|
List<Book> bookSeries = inpEntryRepository.findByTitleContainingIgnoreCase(search);
|
||||||
model.addAttribute("series", bookSeries);
|
model.addAttribute("series", bookSeries);
|
||||||
|
|
||||||
List<Author> authors = authorRepository.findByAuthorNameContainingIgnoreCase(search);
|
List<Author> authors = authorRepository.findByAuthorNameContainingIgnoreCase(search);
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.redrise.marinesco.library.web;
|
package ru.redrise.marinesco.library;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@ 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.web;
|
package ru.redrise.marinesco.library;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
|
@ -7,7 +7,6 @@ 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")
|
19
src/main/java/ru/redrise/marinesco/library/ParseThread.java
Normal file
19
src/main/java/ru/redrise/marinesco/library/ParseThread.java
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue