![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
(28)...mybatis
IT云清
技术专家,团队主管,Apache Seata Committer,公众号:java4all
展开
-
复杂sql
这里记录一条mybatis中的sql,涉及以下几点: 1.foreach 2.大于等于号,小于号 3.foreach遍历 4.模糊匹配 5.and 和or 的复杂拼接 6.一个巧妙的用法:1=0 <select id="findByPageForEntFile" resultMap="resMap2" statementType="STATEMENT"> sel...原创 2018-04-27 22:14:45 · 315 阅读 · 0 评论 -
mybatis插入0显示null的解决办法
问题:mybatis,插入或者更新一个Integer类型的字段时,进来的值为0,但数据库最终结果却为null。 原因:多半是对这个值做了如下判断: &lt;if test="labelTalentEnt != null and labelTalentEnt != ''"&gt; label_talent_ent = #{labelTalentEnt}, ...原创 2018-06-12 17:35:58 · 2934 阅读 · 1 评论 -
Parameter 'stock' not found. Available parameters are [arg1, arg0, param1, param2]
SpringBoot 2.1.0,mybatis1.3.1,做一个简单的压测时,出现了一个和压力测试无关的其他的常见的问题: org.apache.ibatis.binding.BindingException: Parameter 'stock' not found. Available parameters are [arg1, arg0, param1, param2] at org.ap...原创 2018-11-28 16:04:11 · 991 阅读 · 0 评论 -
The bean 'dataSource', defined in BeanDefinition defined in class path resource
SpringCloud,SpringBoot,Mybatis整合时,启动项目,遇到一个错误: 2019-02-13 15:38:02.393 INFO 7512 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the c...原创 2019-02-13 16:12:06 · 9143 阅读 · 0 评论