异常
YABAJ
这个作者很懒,什么都没留下…
展开
-
springmvc+hibernate报错expected at least 1 bean which qualifies as autowire candidate
出现以下错误解决方法org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'addAndShowQuestionAction': Unsatisfied dependency expressed through field 'answerService'; ne原创 2017-03-24 09:59:26 · 6299 阅读 · 1 评论 -
java.lang.UnsupportedOperationException
纠结半天,最后的结果是 使用Arrays.asList(strArray)方法将数组转成list(ArrayList)后,得到的list无法进行add或remove操作。 解决方案一: 你新建一个list,一个个将数组中的元素add进去,再remove掉你想删掉的元素。 解决方案二: List strList = new ArrayList(Arrays.asList(strArr));原创 2017-03-18 15:06:33 · 364 阅读 · 0 评论 -
使用@responseBody遇见的异常
下面试一个使用@responseBody的小例子: 正确spring配置文件:mvc:annotation-driven> mvc:message-converters> bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.converter.js原创 2017-04-26 09:43:55 · 1987 阅读 · 0 评论 -
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
eclipse中tomcat启动时报错,java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet。首先看web.xml中的,<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>原创 2017-04-25 17:29:50 · 4956 阅读 · 0 评论 -
The content of element type "tag" must match
The content of element type “tag” must match “(name,tag-class,tei-class?,body-content?,display-name?,small-icon?,large-icon?,description?,variable*,attribute*,example?)”带?的属性是最多一个 带*的属性不限个 不带符号的属性必须有原创 2017-11-01 12:59:47 · 1733 阅读 · 0 评论 -
Encountered a duplicated sql alias [FEE_CHARGING] during auto-discovery of a native-sql query
org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException: Encountered a duplicated sql alias [FEE_CHARGING] during auto-discovery of a native-sql query这是hibernate报错,说我的字段[FEE_CHARGING]没有加别名 ...原创 2018-05-24 11:12:37 · 509 阅读 · 0 评论