nested exception is javax.validation.ValidationException错误解决思路
2015-12-18 16:08
627 查看
今天试了很多方法,最后解决思路是:
1、applicationContext.xml加上default-autowire="byName"
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" default-autowire="byName">
2、加上hibernate-validator依赖的jar包
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
即可
1、applicationContext.xml加上default-autowire="byName"
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" default-autowire="byName">
2、加上hibernate-validator依赖的jar包
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
即可
相关文章推荐
- java设计模式之工厂模式
- Eclipse快捷键 10个最有用的快捷键
- 学了Java 你未必知道这些
- Java:按值传递还是按引用传递详细解说
- 使用axis创建调用 wsdl 形式的 webservice的方法
- javaEE缓存error保存
- java web 基础
- java对象的强引用,软引用,弱引用和虚引用
- MyEclipse中.classpath、.project、.mymetadata解读
- 关于Java图形化连接微软SQL server(含2005,2008,2012等)数据库的问题
- java的反射。
- Debian上安装java
- struts2 配置json格式数据( includeProperties中对list集合的正则配置)
- 10个Eclipse调试技巧
- 【转载】Eclipse 的快捷键以及文档注释、多行注释的快捷键
- Java标识符&关键字
- websocket 聊天室搭建技术点
- 读《疯狂Java讲义》笔记总结二
- Java-Bigdecimal四舍五入/除法
- 第一章 Web MVC简介 —— SpringMVC