我正在使用liquibase从现有数据库创建changelog,它正在使用xml格式。当我添加.yaml格式时,它失败了抱怨没有找到必要的类。我在classpath上添加了snakeyaml-1.12.jar并将其加载到命令中,就像这里一样。
java -jar liquibase.jar --driver = com.mysql.jdbc.Driver --classpath = snakeyaml-1.12.jar; mysql-connector-java-8.0.11.jar --changeLogFile = db.changelog.xml --url =" JDBC:MySQL的://本地主机:3306 / ABC" --username = abcd --password = @@@@ --defaultSchemaName = abc generateChangeLog
我正在追踪异常
Liquibase Update Failed: No serializer associated with the filename or extension 'yaml'
SEVERE 6/14/18 1:31 PM:liquibase: No serializer associated with the filename or extension 'yaml'
java.lang.RuntimeException: No serializer associated with the filename or extension 'yaml'
at liquibase.serializer.ChangeLogSerializerFactory.getSerializer(ChangeLogSerializerFactory.java:51)
at liquibase.diff.DiffResult.printChangeLog(DiffResult.java:405)
at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:151)
at liquibase.integration.commandline.Main.doMigration(Main.java:760)
at liquibase.integration.commandline.Main.main(Main.java:134)