Warning
JavaBooks is in active development.This > APIs may change without notice. Use at > your own risk.
JavaBooks is a Java library for managing books in console apps, web applications, and games like Minecraft.
It provides add/list/search methods and can be integrated into Java projects, including Spring Boot web apps and game mods.
JavaBooks/ │ ├─ src/com/javabooks/ │ ├─ model/Book.java │ ├─ service/Library.java │ └─ Main.java │ ├─ misc/ │ ├─ screenshot_console.png │ └─ screenshot_web.png │ ├─ examples/ │ ├─ ExampleConsole.java │ └─ ExampleWeb.java │ ├─ .github/workflows/build.yml ├─ Dockerfile ├─ docker-compose.yml ├─ LICENSE ├─ CONTRIBUTING.md ├─ CODE_OF_CONDUCT.md └─ README.md
- Add books to library
- List all books
- Search books by author or title
- Ready for integration in web apps and games
- Console demo included for testing
- GitHub Pages Demo: JavaBooks Web Demo
- Spring Boot Web Demo: JavaBooks API
Caution
Live demos may not contain all features.
Clone the repository:
git clone https://github.com/Kercx/JavaBooksInclude the library in your project. Maven:
com.javabooks javabooks 1.0.0Gradle:
implementation 'com.javabooks:javabooks:1.0.0'📚 Usage Examples Console Example
import com.javabooks.model.Book;
import com.javabooks.service.Library;
public class ExampleConsole {
public static void main(String[] args) {
Library library = new Library();
library.addBook(new Book("Java Programming", "John Doe", 2022));
library.addBook(new Book("Minecraft Modding", "Jane Smith", 2023));
library.listBooks();
library.searchByAuthor("Jane Smith");
}
}Web Example (Spring Boot)
@RestController
@RequestMapping("/books")
public class ExampleWeb {
private Library library = new Library();
@GetMapping
public List to<Book> getAllBooks() {
return library.getBooks();
}
@PostMapping
public String addBook(@RequestBody Book book) {
library.addBook(book);
return "Book added successfully!";
}
}Warning
Web example requires Spring Boot dependencies and setup.
Method Endpoint Description GET /books Get all books POST /books Add book GET /books/search Search
docker build -t javabooks .
docker run -p 8080:8080 javabooksThanks to all organizations and individuals supporting JavaBooks.
Thanks to everyone using JavaBooks and contributing to the project.
Below are amazing GitHub users and contributors!