BAEL-3498: Change anonymous inner class to lambda

This commit is contained in:
Krzysiek 2019-11-23 22:58:54 +01:00
parent 52bdfd60a5
commit 5214841266
1 changed files with 2 additions and 6 deletions

View File

@ -2,7 +2,6 @@ package com.baeldung.flywaycallbacks;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.flywaydb.core.Flyway;
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy; import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -14,11 +13,8 @@ public class EmptyMigrationStrategyConfig {
@Bean @Bean
public FlywayMigrationStrategy flywayMigrationStrategy() { public FlywayMigrationStrategy flywayMigrationStrategy() {
return new FlywayMigrationStrategy() { return flyway -> {
@Override log.info("Skipping Flyway migration!");
public void migrate(Flyway flyway) {
log.info("Skipping Flyway migration!");
}
}; };
} }
} }