报错原因是没有配置数据库配置。
修改在application.properties中添加配置:
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.url= jdbc:mysql://127.0.0.1:3306/xxxx?useUnicode=yes&characterEncoding=UTF-8&useSSL=false spring.datasource.username = xxxx spring.datasource.password = xxxx