没有为占位符表达式提供任何值

问题描述 投票:0回答:1

尽管设置了flyway.placeholderReplacement = false但我仍然看到错误,因为Flyway没有为sql中的占位符表达式提供任何值

错误:意外错误org.flywaydb.core.api.FlywayException:没有为占位符表达式提供值:&条件。检查你的配置!在org.flywaydb.core.internal.database.oracle.pro.SQLPlusPlaceholderReplacer.replacePlaceholders(SQLPlusPlaceholderReplacer.java:132)org.flywaydb.core.internal.util.line.PlaceholderReplacingLine.getLine(PlaceholderReplacingLine.java:36)at org位于org.flywaydb.core.internal.database的org.flywaydb.core.internal.database.ExecutableSqlScript。(ExecutableSqlScript.java:133)中的.flywaydb.core.internal.database.ExecutableSqlScript.extractStatements(ExecutableSqlScript.java:156)。 oracle.OracleSqlScript。(OracleSqlScript.java:61)位于org.flywaydb.core.internal.database.Database.createSqlScript的org.flywaydb.core.internal.database.oracle.OracleDatabase.doCreateSqlScript(OracleDatabase.java:126)中。 .java:163)org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.getSqlScript(SqlMigrationExecutor.java:96)at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeInTransaction(SqlMigrationExecutor.java:109 )org.flywaydb.core.internal.command.DbMigrate.isExecuteGroupIn位于org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:275)的org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244)上的事务处理(DbMigrate.java:312) org.flywaydb.core.internal.command.DbMigrate.access $ 100(DbMigrate.java:53)org.flywaydb.core.internal.command.DbMigrate $ 2.call(DbMigrate.java:163)org.flywaydb.core .internal.command.DbMigrate $ 2.call(DbMigrate.java:160)org.flywaydb.core.internal.database.Connection $ 1.call(Connection.java:145)at org.flywaydb.core.internal.util.jdbc位于org.flywaydb.core.internal.database.Connection.lock(Connection.java:141)的.TransactionTemplate.execute(TransactionTemplate.java:74)位于org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java) :150)位于org.flywaydb的org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:160)org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:138)。 core.Flyway $ 1.execute(Flyway.java:947)org.fl ywaydb.core.Flyway $ 1.execute(Flyway.java:910)org.flywaydb.core.Flyway.execute(Flyway.java:1238)at org.flywaydb.core.Flyway.migrate(Flyway.java:910)at org.flywaydb.commandline.Main.executeOperation(Main.java:161)at org.flywaydb.commandline.Main.main(Main.java:108)构建步骤'执行shell'标记构建为失败完成:FAILURE

flyway
1个回答
1
投票

flyway.placeholderReplacement=false仅适用于Flyway占位符,而不适用于SQL * Plus占位符。

要禁用特定于SQL * Plus的占位符,必须在脚本中包含SET DEFINE OFF

© www.soinside.com 2019 - 2024. All rights reserved.