如果不建立数据库b3log,会出现下面提示:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'b3log'
package org.b3log.latke;
import java.sql.SQLException;
import org.b3log.latke.repository.jdbc.util.*;
public class testDriver {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String driver = Latkes.getLocalProperty("jdbc.driver");
System.out.println(driver);
Latkes.initRuntimeEnv();
try {
Connections.getConnection();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Connections.shutdownConnectionPool();
}
}
输出:
com.mysql.jdbc.Driver
七月 16, 2013 6:43:59 上午 org.b3log.latke.Latkes initRuntimeEnv
INFO: Latke is running on [LOCAL] with mode [DEVELOPMENT]
七月 16, 2013 6:43:59 上午 org.b3log.latke.Latkes initRuntimeEnv<