schema.sql does not take effect to solve

In SpringBoot 1.x, running schema.sql can be run between without configuration, but in SpringBoot 2.x, it needs to be configured in the yaml filespring.datasource.initialization-mode: always

spring.datasource.initialization-mode: always
schema-*.sql、data-*.sql
默认规则:schema.sql,schema-all.sql;

可以使用   指定位置
	schema:
      - classpath:department.sql
      指定位置

Guess you like

Origin blog.csdn.net/weixin_45627031/article/details/108082560