select
TOM_ID
from
TEST
where 1=1
AND HOST_IP = #{ipAddr}
日志输出:
11:04:02.942 [http-bio-8080-exec-5] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
11:04:02.942 [http-bio-8080-exec-5] DEBUG org.mybatis.spring.SqlSessionUtils - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7ecc30a4] was not registered for synchronization because synchronization is not active
11:04:02.942 [http-bio-8080-exec-5] DEBUG org.mybatis.spring.SqlSessionUtils - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7ecc30a4]
这个查询没有返回,也没有报错,执行到这里程序就不走了, 其他查询是可以成功的,也可以打印出sql语句,但是这个查询就是不行。。