springboot2.0之schema.sql问题

springboot2.0之schema.sql问题

一张图搞定

重点:配置init…ALWAYS (大写!)

代码自取如下:

spring:
  datasource:
    username: root
    password: 123456
    url: jdbc:mysql://xxx.xxx.xxx.xxx:+自行设置的端口号+/+数据库名字
    driver-class-name: com.mysql.cj.jdbc.Driver
    initialization-mode: ALWAYS
    schema:
     - classpath:department.sql

在这里插入图片描述

发布了47 篇原创文章 · 获赞 51 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/qq_41976613/article/details/102933029