3. 增加数据库配置:

将application.properties改为application.yml.

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: root
    password:
    url: jdbc:mysql://localhost:3306/sell?characterEncoding=utf-8&serverTimezone=UTC&useSSL=false
  jpa:
    show-sql: true

4. 目录结构:

├─ com.shop
│   └─ dataobject
│        └─ ProductCategory.java
│   └─ enums
│        └─ OrderStatusEnum.java
│   └─ controller
│        └─ OrderController.java  


com.shop是一个根包
SellApplication.java启动文件