2019-08-29 SpringBoot FlywayAutoConfiguration

Flyway

FlywayAutoConfiguration

flyway.enabled=true时才会被初始化

并且在DataSourceAutoConfiguration和HibernateJpaAutoConfiguration初始后进行初始化。确实有数据源和jpa

FlywayConfiguration

  • 构造,注入配置、数据源,FlywayMigrationStrategy(这个可自定义)

  • 初始化Flyway 支持不同{vender}设置不同sql

  • 初始化FlywayMigrationInitializer对象

FlywayMigrationInitializer对象实现了InitializingBean接口,会在初始后执行afterPropertiesSet方法

你可能感兴趣的:(2019-08-29 SpringBoot FlywayAutoConfiguration)