开发者

Easiest way to verify MyBatis 3.x caching is working properly

开发者 https://www.devze.com 2023-01-08 11:11 出处:网络
Gre开发者_如何学Cetings! I\'m trying to set up caching for a small MyBatis & Spring app and following their pdf doc my xml mapper contains

Gre开发者_如何学Cetings! I'm trying to set up caching for a small MyBatis & Spring app and following their pdf doc my xml mapper contains

<cache />

Configuration xml file at the top has settings as follows:

    <settings>
    <setting name="cacheEnabled" value="true" />
</settings>

logging with log4j is set for DEBUG, but I see no indications that cache is working as expected.

I'm not sure what I'm missing here. Thanks in advance


... that was easy:

log4j.logger.org.apache.ibatis=DEBUG
log4j.logger.org.apache.ibatis.common.jdbc.SimpleDataSource=DEBUG
log4j.logger.org.apache.ibatis.common.jdbc.ScriptRunner=DEBUG
log4j.logger.org.apache.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
log4j.logger.org.apache.ibatis.cache.decorators.LoggingCache=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
log4j.logger.java.sql.ResultSet=DEBUG

... the rest: not so much. Just can't get the caching to work.

I think it's time to switch to something else. Check out their mailing list and draw your own conclusions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号