Back-end part of my engineering thesis' web application realizing virtual notice board written in Java using Spring Boot framework.
This project requires Java 15 and running MySQL server.
In order to run this application, a few environment variables must be defined:
DATABASE_USERNAME- username used to access the databaseDATABASE_PASSWORD- password used to access the databaseMAIL_HOST- SMTP server address, used to send emails to app usersMAIL_PORT- SMTP server portMAIL_USERNAME- mail server usernameMAIL_PASSWORD- mail server password
Run create_database.sql script located in src/main/resources to create sample database.
Sample database user credentials:
- username:
springuser - password:
j248Y2d3qW6xWYVi4DRUEZun686JvgDA
After creating database and defining environment variables please run:
- on Windows:
gradlew.bat bootRun- on Linux/macOS:
./gradlew bootRunBack-end server will then be available under http://localhost:8080.
API documentation will be available under http://localhost:8080/swagger-ui/.
In order to access user data, you have to log-in using /login endpoint providing proper credentials.
After successful authentication you'll receive accessToken in response.
It should be included with every request in Authorization header (formatted as Bearer ACCESS_TOKEN_HERE).
In order to fill database with sample data, data.sql script located in src/main/resources is executed at launch of the application.
Sample data contains: 10 user accounts (6 personal, 4 institutional), sample boards, posts, comments and likes.
-
Personal accounts:
jan.kowalski@example.comlidia.lukasik@example.commichalina.madej@example.commikolaj.czyz@example.commichal.musial@example.comadam.zak@example.com
-
Institutional accounts:
szkola_muzyczna@example.comjaworzno@example.commajowe_osiedle@example.comvboard@example.com
-
Password for all accounts:
aB123456