问题
实战问题总结
潼筱果
这个作者很懒,什么都没留下…
展开
-
Junit执行报错java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
解决方法:分析原因:1、首先检查是否缺少hamcrest包,如果不存在添加hamcrest包(hamcrest-core-1.3.jar)jar下载2、右键点击项目-属性-Java Build Path-Source-Output Folder-设置成:项目名称/target/test-classes...原创 2020-06-04 08:26:11 · 122 阅读 · 0 评论 -
linux环境安装mysql所遇bug
cd software/tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz./bin/mysql_install_db --user=mysql如出现以下错误:-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory原因:缺 perl perl-devel包。解决办法:安装上即可: yum install -y原创 2020-06-02 20:23:23 · 112 阅读 · 0 评论 -
react错误总结
问题:使用Element React报错:Compiling…Failed to compile../node_modules/element-react/dist/npm/es5/libs/animate/index.jsModule not found: Can’t resolve ‘react-hot-loader’ in 'F:\my-app\node_modules\element-react\dist\npm\es5\libs\animate’解决方法:在终端执行npm inst原创 2020-06-02 13:35:52 · 344 阅读 · 0 评论 -
redis连接错误
问题:Unable to connect to Redis; nested exception is io.lettuce.core.RedisCommandTimeoutException: Command timed out after no timeout**错误原因:**连接超时时间设置的过于短暂(我这边设置成了0),修改为5000左右即可解决方法:#连接超时时间(毫秒)spring.redis.timeout=5000问题:org.springframework.data.redi原创 2020-06-02 13:29:11 · 287 阅读 · 0 评论 -
ajax全局处理异常获取返回结果失败
问题:org.thymeleaf.exceptions.TemplateInputException: Error resolving template “err/getAjaxerror”, template might not exist or might not be accessible by any of the configured Template Resolvers解决方法:在全局捕获异常类中使用@RestControllerAdvice,并且使用ajax发送交易处理时 返回json数原创 2020-06-02 13:24:06 · 428 阅读 · 0 评论 -
SpringBoot启动项目时红色警告
问题:WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with exi原创 2020-06-02 13:22:36 · 936 阅读 · 0 评论 -
MySQL数据库使用代码生成器报“Table name pattern can not be NULL or empty.”错误的解决
在JDBC的链接地址上加上nullNamePatternMatchesAll=true找不到MapperPlugin引入<dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper</artifactId> <version>4.1.5</version></dependency即可成功生成mapper和mapper.原创 2020-06-02 13:20:04 · 1178 阅读 · 2 评论 -
Activiti启动项目遇到问题
问题:SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.解决方法:在pom.xml文件中添加如下代码:<dependency>原创 2020-06-02 13:18:34 · 1718 阅读 · 0 评论 -
Junit调用Scanner对象失败
问题:IDEA中使用JUnit的@Test单元测试时。发现使用Scanner不能在控制台输入解决方法:修改idea安装目录\bin下的idea64.exe.vmoptions 、idea.exe.vmoptions两个文件,在文件末尾加上这行代码:-Deditable.java.test.console=true然后重启IDEA...原创 2020-06-02 13:16:43 · 103 阅读 · 0 评论 -
Spring问题
问题:在使用spring申明事务管理,加入定义注解事务<tx:annotation-driven transaction-manager=“transactionManager”/> 后出现 java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor这样的问题解决方案:1、项目中缺少aopalliance的jar包,下载一个相应的jar加入项目中就可以解决问题。2、aopalliance这个jar包原创 2020-06-02 13:07:31 · 61 阅读 · 0 评论 -
SpringMVC启动项目报错
Error creating bean with name ‘org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0’: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutDesignatorHandler解决方案:这是因为少了aop所必须的ja原创 2020-06-02 13:06:14 · 122 阅读 · 0 评论 -
Idea控制台输出中文乱码问题解决
首先,找到 IntelliJ IDEA 的安装目录,进入bin目录下,定位到idea.exe.vmoptions文件和idea64.exe. vmoptions文件,分别追加-Dfile.encoding=UTF-8最后,在 IntelliJ IDEA 中的“Run/Debug Configurations”中,修改虚拟机参数“ VM options ”,内容与在文件idea.vmoptions中追加的内容相同,皆为-Dfile.encoding=UTF-8重启乱码修改成功。...原创 2020-06-02 13:03:16 · 154 阅读 · 0 评论