Basic project of product flash sale project based on springboot+js (separation of front and back ends)
development environment
- maven 3.6
- SpringBoot 2.2.4
- IDEA 2019.3
- mysql 8.0
- VS Code
- Alibaba Cloud Host+redis
- lombok plugin support
Dependency import
- springboot-web
- hibernate validator
- Alibaba Cloud market SMS service related dependencies
- mysql driver (8.0) and data source (com.alibaba.Druid)
- joda-time time support
Function introduction
front end
- register.html registration page (implementing mobile phone number + verification code registration method)
- login.html login page (mobile phone number + password)
- itemlist.html displays the item list
- item.html product details page and order function
- ajax interaction (json data transmission)
rear end
- hibernate validator data verification, custom result encapsulation
- redis stores user registration verification code
- Alibaba Cloud Market SMS service, send registration code
- Global exceptions are handled uniformly and the return format is unified.
- Return value encapsulation, return unified object
- Persistence layer, business layer, controller layer object conversion
- mybatis generator
- User registration and login functions
- Product inquiry and added functions
- Order creation function
- Password encryption, separate table creation
Things to note
- If you clone the project or download the code directly, please modify the host and port of the redis configuration in application. statement to replace)
- Pay attention to the mysql version. The driver used in 8.0 is com.mysql.cj.jdbc.Driver
- In the mybatis-generator configuration file, there is an item that sets the location of the mysql driver package. Pay attention to modifications.