Compare commits

..

2 commits

Author SHA1 Message Date
Dmitry Isaenko
c66bf41d72 Fix find-by-series function on search page 2024-01-16 00:50:23 +03:00
Dmitry Isaenko
45f4e802d2 fix postgresql setup 2024-01-16 00:49:38 +03:00
5 changed files with 8 additions and 24 deletions

View file

@ -18,7 +18,7 @@ services:
postgres: postgres:
image: postgres image: postgres
volumes: volumes:
- ./files/postgresql:/var/lib/postgresql - ./files/postgresql/data:/var/lib/postgresql/data
environment: environment:
- POSTGRES_USER=mari - POSTGRES_USER=mari
- POSTGRES_PASSWORD=example - POSTGRES_PASSWORD=example

View file

@ -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;
}
}

View file

@ -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")

View file

@ -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")

View file

@ -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);