
在不断的遇坑中进步
L聪聪聪
这个作者很懒,什么都没留下…
展开
-
Mybatis的书写XML遇到的坑
这段时间在京东实习,没想到在写mybatis时遇到那么多小问题,这些问题其实注意点就可以避免的,做个阶段性的小总结。1、#{} 和 ${} 是mybatis提供的两种动态sql的语法。2、在预编译阶段,#{}被解析成一个站位符 ?, ${}只是简单的字符串拼接。所以从安全性上讲,尽量使用#{},可以防止sql注入。3、#{}参数替换发生在DBMS中, ${}参数替换发生在动态解析过程中...原创 2018-09-13 13:07:44 · 413 阅读 · 0 评论 -
马上大四下学期了,要回学习答辩了,毕设做个啥呢。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
烦躁。。。。。。。。。。。。。。。。。。。。。。。。。。。。原创 2019-02-12 22:01:55 · 2700 阅读 · 0 评论 -
解决:Element 'beans' cannot have character [children], because the type's content type is element-only
错误:遇到好几次这种问题了,一般出现在XML文件里,maven的setting.xml,pom.xml等等。解决: 编码问题,在网上copy依赖的时候,多copy了特殊字符,重新自己写一下就好了。...原创 2019-02-12 21:52:50 · 3960 阅读 · 0 评论 -
解决idea:java: -source 1.5 中不支持 multi-catch 语句(请使用 -source 7 或更高版本以启用 multi-catch 语句)
错误:Error:(34, 38) java: -source 1.5 中不支持 multi-catch 语句(请使用 -source 7 或更高版本以启用 multi-catch 语句) 解决:file -> project structure -> Modules -> Sources -> Language level 改为 7.0以上。...原创 2019-02-12 21:36:25 · 3463 阅读 · 0 评论 -
彻底解决Idea控制台的中文乱码问题
一.出现问题tomcat输入到idea控制台的信息出现中文乱码。二.解决方案1.打开idea安装的目录,bin文件夹下,找到idea.exe.vmoptions和idea64.exe.vmoptions两个文件,打开。2.将-Dfile.encoding=UTF-8写到最后一行。 3.打开idea的 Setting -> Editor-> File...原创 2019-02-22 15:15:56 · 24260 阅读 · 10 评论 -
解决debug代码进不去的坑
今天遇到了一个很奇葩的事情,debug打的断点老是进不去,接口路径什么的没有错误。搞了好久没有找到原因,网上的原因说的也不符合自己的情况,问了下实习的导师的,原来这么简单。具体原因如下:我之前在断点前面的代码添了一行,导致idea识别断点,以为断点还在哪一行,其实这时候还是时到了下一行的注释。解决也很简单,将idea tomcat 设置成热加载自动更新,自动检测更改的代码编译。...原创 2019-01-07 19:20:01 · 6089 阅读 · 0 评论 -
解决Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install的错误
环境:idea编译器,SSM框架。一.报错:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project XXX: Failed to install metadata XXX/maven-metadata.xml: ...原创 2018-12-10 16:08:52 · 40540 阅读 · 6 评论 -
解决org.apache.ibatis.reflection.ReflectionException异常
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'xxxx' in 'class xx.xxx.xxx' at org.mybatis.s...原创 2018-12-20 16:49:15 · 49417 阅读 · 4 评论 -
解决template might not exist or might not be accessible by any of the configured Template Resolvers
org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet [spring] in context with path [/xxx] threw exception [Request processing failed; nested exception is org.thymelea...原创 2018-12-20 16:33:29 · 3957 阅读 · 0 评论 -
解决org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible异常
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression '参数。。。。at org.mybatis.spring.MyBatisExceptionTranslator.translat...原创 2018-12-20 16:22:55 · 32893 阅读 · 0 评论 -
解决Error querying database. Cause: java.sql.SQLException: Could not retrieve transation read-only
org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet [spring] in context with path [XXX] threw exceptionorg.springframework.dao.TransientDataAccessResourceException:...原创 2018-12-20 16:16:27 · 3182 阅读 · 1 评论 -
解决 Failed to execute goal plugins:maven-clean-plugin:2.5:clean (default-clean) on project报错
在用maven的Tomcat插件启动项目时经常出现这个错误 Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project。看一下上次项目是否停止,这个错误应该有进程正在占用项目下的target文件夹,通过maven的clean操作即可删除该文件。...原创 2018-12-14 20:55:32 · 2668 阅读 · 1 评论 -
解决由于Idea/Java循环依赖造成的报错
1.环境:Idea,Jrebel+Tomcat环境,Maven项目,分了模块。2.报错:今天用热部署的时候,jrebel重新编译代码的时候出了一个错误:Error:java: Annotation processing is not supported for module cycles. Please ensure that all modules from cycle [A,B] ...原创 2018-12-14 17:54:52 · 6286 阅读 · 0 评论 -
解决SSM项目启动时卡在Initializing Spring root WebApplicationContext
今天用idea加jrebe插件启动SSM项目时,项目就是卡在 Initializing Spring root WebApplicationContext启动不了。从大意上看应该是配置文件出了问题,可我的配置文件不改过我,仔细检查了半天,原来我Mybatis的一个XML映射文件写错了,导致项目启动不起来。总结:下次遇见这种问题,着重从以下几个方面检查:1.项目的配置文件。2.myb...原创 2018-12-13 22:28:13 · 1128 阅读 · 0 评论 -
解决Injection of autowired dependencies failed的报错
错误:严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error ...原创 2018-12-12 22:05:48 · 2538 阅读 · 0 评论 -
解决dubbo异常:com.alibaba.dubbo.rpc.RpcException:Forbid consumer...
com.alibaba.dubbo.rpc.RpcException:Forbid consumer 10.x9.xx.xx access service service.com.xx.xx.XxxService from registry 1xx.xx.xx.1:2181 use dubbo version 2.5.3.Please check registry access li...原创 2018-11-27 10:35:13 · 14369 阅读 · 4 评论 -
解决Mysql报错:the service mysql57 failed the most the most recent status change request with the message
报错:the service mysql57 failed the most the most recent status change request with the message time out has expired and the opertion has not been completed if problem persists please restart mysql no...原创 2019-02-24 20:59:16 · 3892 阅读 · 0 评论