βιβλίο (Reading: Vivlio) in Greek means book. This is just simple Book management API. The goal of this project is to implementing HATEOAS architecture, authentication with JWT using OAuth2 Resource Server and method based authorization using built-in Spring Security. And also implement custom UserDetails and its service that can be persisted into database.
Requirement:
- Java 21 or later
- PostgreSQL database server
Steps:
- Migrate the database from file
database.sql
that already located in the root directory of this repository. - Generate private and public RSA key (you can use tool like openssl to generate it). Feel free to locate those file anywhere in you machine but i prefer put them in project classpath (inside
src/main/resources
folder). - Configure the app. You can follow the example from
application.yaml.example
file insidesrc/main/resources
. - Run the app:
./mvnw spring-boot:run