Appearance
Mybatis-config.xml 增加以下配置
Mybatis-config.xml
<plugins> <plugin interceptor="com.dcits.comet.dao.interceptor.LimitResultRowsInterceptor"> <property name="maxRows" value="1"/> </plugin> </plugins>
maxRows 的值为一个查询 sql 的最大获取结果数;对所有查询 sql 均生效。
maxRows
sql