目录
1. Generate a repo with Spring Initializr
(1) git clone the demo project
- Dependencies: Spring Web+ Spring JPA + MySQL
1. Generate a repo with Spring Initializr
Initializr site: https://start.spring.io/
2. Install and start MySQL
(1) reference website: MySQL 安装 | 菜鸟教程
(2) create a database named "runoob".
(3) database connection configuration in the file of application.properties:
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/runoob
spring.datasource.username=root
spring.datasource.password=333333
spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
3. A demo project from Github
(1) git clone the demo project
git clone https://github.com/lilulilulilu/webmybatis.git
(2) start the project
run WebmybatisApplication.java as Java Application under JRE 1.8.0