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