我正在尝试通过changelog xml
输出java
文件。
我不确定我需要将参数作为参数传递给以下方法。
liquibase.generateChangeLog("chris", changeLogWriter, outputStream, snapshotTypes);
Chris
是schema name
中的Oracle 11g XE
。
我不想在命令行上生成。我想使用我正在构建的应用程序来生成它。
public class Test {
public static void main(String[] args) {
String driverName = "oracle.jdbc.driver.OracleDriver";
String dbURL = "jdbc:oracle:thin:@localhost:1521:xe";
String userName = "chris";
String userPwd = "Liberty123";
try {
Class.forName(driverName);
Connection c = DriverManager.getConnection(dbURL, userName, userPwd);
System.out.println("success");
Liquibase liquibase = null;
try {
Database liqui_oracle = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(c));
liquibase = new Liquibase("", new FileSystemResourceAccessor(), liqui_oracle);
liquibase.generateChangeLog("chris", changeLogWriter, outputStream, snapshotTypes);