List of usage examples for org.apache.ibatis.jdbc SqlRunner selectAll
public List<Map<String, Object>> selectAll(String sql, Object... args) throws SQLException
From source file:com.glaf.core.test.MyBatisJdbcRunnerTest.java
License:Apache License
@Test public void testSelectMany() { Connection connection = null; SqlRunner runner = null; try {//from ww w . j a va 2 s.co m connection = DBConnectionFactory.getConnection(); runner = new SqlRunner(connection); Object[] args = { "SYS", "fs_%" }; List<Map<String, Object>> dataList = runner .selectAll(" select * from SYS_PROPERTY where CATEGORY_ = ? and NAME_ like ? ", args); System.out.println(dataList); } catch (Exception ex) { ex.printStackTrace(); } finally { JdbcUtils.close(connection); } }