![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
心写来潮
记录与学习
展开
-
Caused by: org.apache.ibatis.binding.BindingException: Parameter ‘codeId‘
Caused by: org.apache.ibatis.binding.BindingException: Parameter ‘codeId’ not found. Available parameters are [arg1, arg0, param1,param2]由于平时用mybatis时都是传对象,这次单独传两个参数时,报了这个异常,反应了几秒才反应过来。废话不多说,直接解释原因与解决方法:看异常信息很明显是由于参数绑定问题。只需在xxxMapper.java 的函数里的参数前加上@Pa原创 2022-03-09 10:28:50 · 1160 阅读 · 0 评论 -
Java清空文件内容
在网上看到很多Java清空文件的方法,有一些是错误的,分享并记录一个有效的)。public static void writeFile() throws Exception{File f = new File (“E:\temp.txt”);FileWriter fw = new FileWriter (f);fw.write("");fw.flush();fw.close();}Tip:网上很多方法都是new FileWriter(f,true);千万不能放true,否则无效,可看源码注原创 2022-02-25 09:57:45 · 4307 阅读 · 0 评论