随笔分类 - 开发异常
摘要:今天重构项目出现 Caused by: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors 异常 原来使用了在数据库连接时使用了 userSSL 参数,将su
阅读全文
摘要:Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'name': was expecting ('true', 'false' or 'null') 参数有问题,不能解析成json对象 ajax提
阅读全文
摘要:问题的根源是出现bean名称重复 原因: 1.两个bean名称重复,spring扫描无法创建bean对象(有时候会与引入的第三方的jar包中的bean名称重复); 2.target中有缓存导致,Maven项目clean下再编译
阅读全文
摘要:从ToolView中打开 Version Control -> Local Changes 中的Default ChangesList里面的文件全选中右键选择 Move to Another Changes List...选项后重新新建一个, 为区分 起名为 ignore
阅读全文
摘要:在连接字符串后面加上?serverTimezone=UTC 其中UTC是统一标准世界时间。 完整的连接字符串示例:jdbc:mysql://localhost:3306/test?serverTimezone=UTC 或者还有另一种选择:jdbc:mysql://127.0.0.1:3306/tes
阅读全文
摘要:SpringBoot正常启动,其它配置都正常,以下是控制台打印: 解决方法: 将controller与application配置文件同层,是访问时无法扫描到相应的controller,故无法映射到相应地址
阅读全文
摘要:按下列步骤操作: 1. 关闭IDEA, 2.然后删除项目文件夹下的.idea文件夹 3.重新用IDEA工具打开项目
阅读全文
摘要:bug类型:1、".equals()" should not be used to test the values of "Atomic" classes. bug 主要 不要使用equals方法对AtomicXXX进行是否相等的判断 Atomic变量永远只会和自身相等,Atomic变量没有覆写eq
阅读全文
摘要:格式:问题名字+问题出现的次数 Resources should be closed2 资源未关闭,打开发现有两处用到的IO流没有关闭 Conditions should not unconditionally evaluate to "TRUE" or to "FALSE"1 if/else判断里
阅读全文
Optional int parameter 'id' is present but cannot be translated into a null value due to being decla
摘要:这个错误可以将参数由int改为Integer
阅读全文
摘要:严重: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [S
阅读全文
摘要:logger.debug、logger.info、logger.warn、logger.error、logger.fatal 的区别: 相同处:它们的作用都是把错误信息写到文本日志里 不同的是它们表示的日志级别不同:日志级别由高到底是:fatal -> error -> warn -> info -
阅读全文
摘要:之前在项目中通过EL表达式从cart 中取出itemPirce这个值时始终报:For input string: "${cart.itemPrice / 100}" 错误。 事故原因: 在通过视图解析器并把数据填充到ModelAndView对象中时出现无法取出itemPrice这个值(EL表达式无效
阅读全文
摘要:后台程序通过Debug都能正常返回数据并封装到Model中。而在前台通过EL表达式取值时却是原样输出,如${cart.num}... 能正常返回数据并通过视图解析器跳转到cart页面,可在cart.jsp中通过EL表达式无法取出。 事故原因: 原来是项目中的web.xml头部声明搞的鬼..... 加
阅读全文
摘要:执行nginx -s reload命令: nginx: [error] OpenEvent("Global\ngx_reload_6252") failed (2: The system cannot find the file specified) 错误原因: Nginx 尚未启动导致,执行 st
阅读全文
摘要:在docker容器上部署项目后,启动docker容器,出现 iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8001 -j DNAT --to-destination 172.17.0.5:8080 !
阅读全文
摘要:在使用SSH 工具向Linux服务器上传文件时,弹出 encountered 1 errors during the transfer 错误。 解决方案: 1.准备上传的那个文件所在目录路径存在(),将这个文件重新copy出来再上传即可。OK搞定!! 2.在SSH Secure File Trans
阅读全文
摘要:当在pojo中,往往会出现字段无法一一对应时,有可能就会出现创建Unrecognized field "state" (class com.jt.manage.pojo.ItemCat)......... 异常。 解决方案: 在当前字段所属的pojo上添加 @JsonIgnoreProperties
阅读全文
摘要:在通过Java程序链接配置好的redis服务时出现 DENIED Redis is running in protected mode because protected mode is enabled 异常。 Redis protected-mode 是3.2 之后加入的新特性,在Redis.co
阅读全文
摘要:Maven默认用的是JDK1.5去编译 diamond运算符,有的书翻译为菱形,有的书写的是钻石语法,指的是JDK1.7的一个新特性 所以Maven默认使用JDK1.5去编译肯定是不认识这个东西的 你可以在pom.xml中加入下面的东西即可 或者你直接在pom.xml中配置Maven的编译插件也是可
阅读全文