Merge pull request 'AL-3470' (!80) from AL-3470 into master

Reviewed-on: utilidades/Flyway#80
master
gleimar 2023-11-21 17:58:04 +00:00
commit b7c73fd1bd
2 changed files with 30 additions and 7 deletions

30
pom.xml
View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>1.19.1</version>
<version>1.20.0</version>
<distributionManagement>
<repository>
@ -54,9 +54,31 @@
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.21.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.21.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.21.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.21.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>2.21.1</version>
</dependency>
<dependency>

View File

@ -19,14 +19,15 @@ import java.util.Map;
import javax.sql.DataSource;
import org.apache.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.flywaydb.core.Flyway;
import org.flywaydb.core.api.callback.FlywayCallback;
import com.rjconsultores.ventaboletos.vo.FlyWayCustomDetail;
public class FlyWay {
private static Logger log = Logger.getLogger(FlyWay.class);
private static final Logger log = LogManager.getLogger(FlyWay.class);
private static final FlyWay INSTANCE = new FlyWay();
@ -150,7 +151,7 @@ public class FlyWay {
try{
String ambiente = System.getProperty("ambiente") ==null || System.getProperty("ambiente").isEmpty() ? "" : System.getProperty("ambiente");
if( (AMBIENTE_DEV.equalsIgnoreCase(ambiente) && AMBIENTE_CONSULTA.equalsIgnoreCase(ambiente)) && Boolean.FALSE.equals(isReloadFlyway) ) {
log.warn("Flyway não executado. Ambiente = dev ou consulta");
log.warn("Flyway não executado. Ambiente = dev ou consulta");
return true;
}