/spring-boot-blog-api

SpringBoot Blog API

Primary LanguageJava

SpringBoot Blog API

Building Real-Time REST APIs with Spring Boot - Blog App

Prerequisites:

Local Install:

  • Make sure to have Maven set up.
# maven: download, extract and move to the executable folder
wget https://dlcdn.apache.org/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.tar.gz
tar -xvf apache-maven-3.9.3-bin.tar.gz
sudo mv apache-maven-3.6.3 /opt/

# publish maven path
export PATH="$PATH:/opt/apache-maven-3.9.3/bin"

# set maven path to the default usable programs
nano ~/.bashrc
# add the line
PATH="$PATH:/opt/apache-maven-3.9.3/bin"
# reload the terminal or apply the changes
source ~/.bashrc
  • Setup src/main/resources/.env credentials as described in src/main/resources/.env.example.

  • Run the app via CLI:

mvn spring-boot:run

Docker Install:

  • Setup .env credentials as described in .env.example.

  • Run Docker Compose:

docker-compose up -d

Guide:

  • As the JWT_SECRET it's recommended to use SHA256 hashed string.

  • Use "ADMIN_***" credentials from src/main/resources/.env.example to act as an admin.

  • Try the Postman Collection using http://localhost:8080 as a dev host URI.

  • Or check the API docs with SwaggerUI on /swagger-ui/index.html

Resources:

Project Related

Used Resources

Useful Links

Course Related

Author: