
JavaWeb
晦暗天明
java后台程序员
展开
-
springboot+thymeleaf无后缀访问static下前端静态HTML报错总结
今天使用springboot+thymeleaf访问前端静态HTML时候,无论Controller里怎么写,lcalhost:8080/login都无法访问到static下的HTML页面,我反复确定Controller代码没问题,于是怀疑可能是配置出问题了。pom.xml里<dependency> <groupId>org.springframework....原创 2019-05-13 03:38:23 · 2212 阅读 · 1 评论 -
spring+mybatis做单元测试报错IllegalStateException
用spring+mybatis做单元测试时,报错java.lang.IllegalStateException: Failed to load ApplicationContextat org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareCo原创 2017-08-19 01:51:48 · 1182 阅读 · 0 评论 -
MySQL的Date数据0000-00-00报错
读取MySQL的用户数据时报错org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.TransientDataAccessResourceException: Error attempting to原创 2017-08-19 02:08:18 · 1693 阅读 · 1 评论 -
SpringMVC和mybatis整合时遇见的错误
在SpringMVC和mybatis整合时遇见个问题,我整合SSM框架时候,spring+mybatis用单元测试是可以运行的,增删改查都没问题。SpringMVC也是可以运行的,WEB-INF目录下的jsp也可以用Controller显示,不同页面之间的参数传递也是没问题。但是mybatis和SpringMVC放一块就出问题了 严重: Exception sending cont原创 2017-08-19 02:23:05 · 1663 阅读 · 0 评论 -
mysql连数据库时出问题
这是我犯过比较愚蠢的错误之一。。。连接数据库时出问题,原因是因为我在jdbc.properties文件里面,把用户名root后面多加了俩空格,肉眼看的时候是完全没问题的,但一运行就抓瞎exceptionorg.springframework.web.util.NestedServletException: Request processing failed; nested exce原创 2017-08-19 02:37:01 · 525 阅读 · 0 评论 -
EL表达式中的首字母大写造成的bug
今天用EL表达式的${ }时出bug了。org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/reader/show.jsp at line 1615: 16: ${reader.R_ID}17: Stacktrace: org.apache.ja原创 2017-08-21 02:16:30 · 1320 阅读 · 1 评论 -
EL表达式取Session取不出来的bug
今天在JSP里用EL表达式取Sessionnet.xcj.entity.Reader r=(net.xcj.entity.Reader)session.getAttribute("reader"); %>${r.r_ID} 运行后,可以取出session的值,而${}却取不出来。和同学反复讨论后,发现问题在${r.r_ID} 的r上面,r原创 2017-09-02 19:45:47 · 3217 阅读 · 0 评论