运行maven项目报错:The method queryForInt(String) is undefined for the type JdbcTemplate
来源:互联网 发布:淘宝上传3c认证入口 编辑:程序博客网 时间:2024/05/29 12:42
报错:The method queryForInt(String) is undefined for the type JdbcTemplate
The method JdbcTemplate.queryForInt was deprecated in Spring 3.2.2 and it was removed in Spring 4.2.0.
问题:spring.jar包问题,spring3.2.2支持 queryForInt(String) 方法,但spring4.2.0不支持这个方法,他只支持 queryForObject(String sql, class<T> requiredType) 这个方法。
解决方法:将spring版本降到spring3.2.2,若为maven项目,可在pom.xml将spring依赖中spring的Version改为3.2.2;或者将自己报错处使用的方法换成queryForObject(String sql, class<T> requiredType)。
阅读全文
0 0
- 运行maven项目报错:The method queryForInt(String) is undefined for the type JdbcTemplate
- jfinal报错The method renderText(String) is undefined for the type HelloController
- 项目报错:The method getTextContent() is undefined for the type Node
- The method isEmpty() is undefined for the type String/String
- The method setCharacterEncoding(String) is undefined for the type HttpServletResponse
- The method setCharacterEncoding(String) is undefined for the type HttpServletResponse
- The method fromObject(String) is undefined for the type JSONObject
- The method isEmpty() is undefined for the type String
- The method setCharacterEncoding(String) is undefined for the type HttpServle
- he method isEmpty() is undefined for the type String/String
- 项目代码报:The method xx方法( ) is undefined for the type XX类
- notification 报错the method build() is undefined for the type Notificatin.Builder
- The method findViewById(int) is undefined for the type FragmentHome报错
- android 6.0 The method sin(float) is undefined for the type FloatMath 报错
- The method getTextContent() is undefined for the type Node方法报错
- 报错 :The method list(String, Object[]) is ambiguous for the type BaseHibernateDao<M,PK>
- the method d(string string) is undefined for the type log
- 开发中碰到的问题:The method getSystemService(String) is undefined for the type CourseFragment
- Python语言在数据挖掘上非常有优势,但它唯一的缺点你知道吗?
- Java8重新认识HashMap
- 链表的创建与删除链表中的元素
- blr:expression(this.onFocus=this.blur())
- 解决ERROR:dbus.proxies:Introspect error on :1.65:/org/freedesktop/PackageKit: dbus.exceptions.
- 运行maven项目报错:The method queryForInt(String) is undefined for the type JdbcTemplate
- Spring Boot简介
- vim常用命令
- java学习【web基础-JSP2-HTTP协议】
- Spring Cloud1实现注册中心and服务的注册与消费
- WCF_IIS宿主服务
- hdu 1754 I Hate It 线段树基础题
- NYOJ-64-鸡兔同笼【数论】
- RaisedCosineWindower API及加窗