<select id="listPage" resultType="org.zerock.domain.BoardVO">
<![CDATA[
select
bno, title, content, writer, viewcnt, regdate
from
(
select
/*+INDEX_DESC(tbl_board, pk_board)*/
rownum rn, bno, title, content, writer, viewcnt, regdate
from tbl_board
where rownum <= #{page} * #{perPageNum}
and bno > 0
)
where rn > (#{page} -1) * #{perPageNum}
]]>
</select>
왜 로그로 데이터들이 출력되지 않을까요...?
답글삭제INFO : jdbc.connection - 1. Connection opened
INFO : jdbc.audit - 1. Connection.new Connection returned
INFO : jdbc.audit - 1. Connection.getAutoCommit() returned true
INFO : jdbc.audit - 1. PreparedStatement.new PreparedStatement returned
INFO : jdbc.audit - 1. Connection.prepareStatement(select
rn, bno, title, content, writer, regdate, viewcnt
from
(
select
rownum rn, bno, title, content, writer, regdate, viewcnt
from tbl_board
where
bno>0
and rownum <= ? * 10)
where rn > (? -1) * 10) returned net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy@2a3c96e3
INFO : jdbc.audit - 1. PreparedStatement.setInt(1, 20) returned
INFO : jdbc.audit - 1. PreparedStatement.setInt(2, 20) returned
INFO : jdbc.sqlonly - select rn, bno, title, content, writer, regdate, viewcnt from ( select rownum rn, bno, title,
content, writer, regdate, viewcnt from tbl_board where bno>0 and rownum <= 20 * 10) where rn
> (20 -1) * 10
INFO : jdbc.sqltiming - select rn, bno, title, content, writer, regdate, viewcnt from ( select rownum rn, bno, title,
content, writer, regdate, viewcnt from tbl_board where bno>0 and rownum <= 20 * 10) where rn
> (20 -1) * 10
{executed in 50 msec}
INFO : jdbc.audit - 1. PreparedStatement.execute() returned true
INFO : jdbc.resultset - 1. ResultSet.new ResultSet returned
INFO : jdbc.audit - 1. PreparedStatement.getResultSet() returned net.sf.log4jdbc.sql.jdbcapi.ResultSetSpy@59d2103b
INFO : jdbc.resultset - 1. ResultSet.getMetaData() returned oracle.jdbc.driver.OracleResultSetMetaData@10650953
INFO : jdbc.resultset - 1. ResultSet.getType() returned 1003
INFO : jdbc.resultsettable -
|---|----|------|--------|-------|--------|--------|
|rn |bno |title |content |writer |regdate |viewcnt |
|---|----|------|--------|-------|--------|--------|
|---|----|------|--------|-------|--------|--------|
INFO : jdbc.resultset - 1. ResultSet.next() returned false
INFO : jdbc.resultset - 1. ResultSet.close() returned void
INFO : jdbc.audit - 1. PreparedStatement.getConnection() returned net.sf.log4jdbc.sql.jdbcapi.ConnectionSpy@7db82169
INFO : jdbc.audit - 1. Connection.getMetaData() returned oracle.jdbc.driver.OracleDatabaseMetaData@1992eaf4
INFO : jdbc.audit - 1. PreparedStatement.close() returned
INFO : jdbc.connection - 1. Connection closed
INFO : jdbc.audit - 1. Connection.close() returned
INFO : org.springframework.context.support.GenericApplicationContext - Closing org.springframework.context.support.GenericApplicationContext@5c7fa833: startup date [Mon Feb 15 21:44:59 KST 2016]; root of context hierarchy
SQL문의 이상은 전혀 없어보입니다. 혹시 데이터베이스를 커밋하시지 않은 것은 아닐까 싶네요.. 답변이 늦어서 죄송합니다.
삭제listpage랑 listCriteria랑 따로 올려주시면 안될까요...?
답글삭제맞는 쿼리인가요...?내용이 저도 안뜨네요...