Skip to content

CodeMin/SprintBootDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Demo Project

This is a demo project which shows how to build a Java service using Spring Boot to provide RESTful APIs. It uses below open source tech stacks:

Database: MySQL

Cache: Redis

Message Queue

Use Rabbit MQ to handle high concurrent requests (2000 QPS).

  • Install RabbitMQ on Mac
brew install rabbitmq
  • Enable RabbitMQ management plugin
cd /usr/local/Cellar/rabbitmq/3.8.9_1/
sudo sbin/rabbitmq-plugins enable rabbitmq_management
  • Add environment variable to ~/.bash_profile
export RABBIT_HOME="/usr/local/Cellar/rabbitmq/3.8.9_1/"
export PATH=$PATH:$RABBIT_HOME/sbin

source ~/.bash_profile to make the environment variable take effect immediately.

  • Start RabbitMQ
sudo rabbitmq-server -detached

Note without sudo you will get the error [error] Error when reading /Users/{username}/.erlang.cookie: eacces

sudo rabbitmqctl stop

Unit Testing

  • JUnit 5
  • Mockito

Scheduled Task

  • Print the current time every 1 minute

Aspect-Orient Programming

  • Permission check to API

Design Pattern

  • Watcher pattern: if a user is created, listeners will take actions accordingly , e.g. send text message, email, etc.

API Document: Swagger

About

Spring Boot Demo Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages