Personal Center

A simple backend application built with Spring Boot which integrates Spring Web, Spring Data JPA and Mail Sender to provide the backend service for User Center. It supports CRUD operations such as:

  • User registration/login.
  • View/update user settings.
  • Article publish/update/delete/show

RESTful Web Service is built based on SpringMVC. The ORM layer follows the JPA specification with default provider Hibernate. JWT is used for authorization purpose. Strategy Pattern / Responsibility Chain Pattern are adopted for service handling

Tech Stacks

  • Spring Boot / Spring MVC
  • Spring Data JPA
  • JWT/Java Mail Sender
  • Mysql

APIS

  • Host: http://localhost:8080/user-center

  • Registration/Login:

    • Post: user/getcaptcha
      • payload: {"username":"your_username","password":"your_password","email":"youremail@mail.com"}
    • Post: user/register
      • payload: {"username":"your_username","password":"your_password","email":"youremail@mail.com", "captcha:"captcha"}
    • Post: user/login
      • paylaod: { username : "your_username", password : "your_password"}
  • User Center (Requires Auth header):

    • Post: account/center
    • Post: account/settings/profile/show
    • Post: account/settings/profile/update
      • payload: {"username": "admin","email": "somemail@mail.com","personalProfile": "Oh Yeah","country": "","province": "","city": "","streetAddress": "","areaNumber": "","phoneNumber": "123123"}
    • Post: account/settings/notice/show
    • Post: account/settings/notice/notice
      • payload: {"todoNotice": "1","sysMessageNotice": "1","otherUserMessageNotice": "1"}
  • Article (Requires Auth header):

    • Post: article/publish
      • payload: {"publishTime":"","title":"","content ":"","articleTagList ":[]}
    • Post: article/update
      • payload: {"id":"","publishTime":"","title":"","content ":"","articleTagList ":[]}
    • Post: article/delete
      • payload: {"id":""}
    • Post: article/show/detail
      • payload: {"id":""}

Get Started

  • Update settings in application.properties
  • Import maven dependency
  • Ensure mysql server is running.
  • Start application.

Official Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely: