- 在開發環境中,遷移是一個挑戰(比如Dev->QA, QA->Prod)
- 假設有個DB config,在Dev上可能使用的是EmbeddedDatabaseBuilder
@Bean(destroyMethod="shutdown") public DataSource dataSource() { return new EmbeddedDatabaseBuilder() .addScript("classpath:schema.sql") //schema會定義在schema.sql中 .addScript("classpath:test-data.sql")//data使用test-data.sql載入 .build(); }