常见的异常
伊柒丶
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
org.junit.runners.model.InvalidTestClassError: Invalid test class
使用Junit4进行测试出现异常: org.junit.runners.model.InvalidTestClassError: Invalid test class ‘com.ayr.community.MailTest’: No runnable methods 查看添加注解是否正确 Junit4的@Test注解是 org.junit.Test; 查看方法是否正确添加了注解 ...原创 2021-05-22 20:13:39 · 1695 阅读 · 0 评论 -
Mybatis There is no getter for property named in class java.lang.Integer
错误信息 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘userId’ in ‘class java.lang.Integer’ 使用select代码块中如果只传入了一个参数,并且这个参数用在了if标签中,则必须使用@Param注解 Mapper接口原创 2021-05-17 15:18:01 · 593 阅读 · 0 评论 -
JavaWeb的错误总结 java.lang.IllegalStateException
JavaWeb的错误总结 java.lang.IllegalStateException: 提交响应后无法调用sendRedirect()。 该错误出现的原因是,在一段代码中,重复的多次执行sendDirect()所导致的。 解决办法:找出代码块中,重复执行的位置进行修改。 见错误代码 if (res == -1 ){ response.sendRedirect(request.getContextPath() + "/BalanceNotEnough.jsp"); }if (res == 2 ){原创 2021-02-05 20:46:45 · 6292 阅读 · 3 评论
分享