开发常见问题
liujiding
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
展开
-
mybatisplus在mysql数据库中查询关键字字段的问题既要
在关键字字段上加入@TableField注解,注解中加入反引号“ ` ”@TableField("`desc`")private String desc;原创 2020-11-24 16:25:14 · 994 阅读 · 2 评论 -
使用iview的Cascader 级联选择报错:Error in callback for watcher "data": "TypeError: Cannot read property
我的问题在于出现了"children": null,将数据中"children": null的删除或者设置为空数组就可以了原创 2020-04-28 10:39:22 · 2284 阅读 · 0 评论 -
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Context
报错信息:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test解决办法:将测试类所在包路径 改成 项目启动类(sprin...原创 2019-07-26 17:01:57 · 112 阅读 · 0 评论 -
intellij debug模式提示 Method breakpoints may dramatically slow down debugging 解决办法
直接上图........点击图中按钮 或者 快捷键(Ctrl - Shift -F8) 出现下图原创 2019-06-20 15:39:57 · 81388 阅读 · 39 评论 -
JPA更新报错:Modifying queries can only use void or int/Integer as return type!
报错信息:org.springframework.dao.InvalidDataAccessApiUsageException: Modifying queries can only use void or int/Integer as return type!代码:@Modifying@Transactional@Query(value = "update Xxx x set x....原创 2019-04-04 14:26:20 · 7613 阅读 · 1 评论 -
Remote System Explorer Operation卡死Eclipse解决方案
在用eclipse开发时,经常遇到卡死的情况,其中一种就是右下角出现:“Remote System Explorer Operation”,解决方案如下:第一步:Eclipse -> Preferences -> General -> Startup and Shutdown.不要勾选 RSE UI.第二步:Eclipse -> Preferences -> Remo...原创 2018-06-01 11:21:22 · 512 阅读 · 0 评论 -
maven项目解决mapper.xml打包进不去问题
问题:打maven包的时候,打完包发现src/main/java中的的mapping文件没有被打包进去;原因:mapping目录里面的文件都是xml文件并不是.java文件,而maven打包默认的src/main/java的是Java文件,它不会打包里面的xml文件,所以在打包之后里面不会有mapping。解决办法: 在pom.xml中添加如下配置: src/mai原创 2018-02-01 18:08:17 · 2095 阅读 · 0 评论 -
【Maven】Project configuration is not up-to-date with pom.xml错误解决方法
Maven项目报如下错误:Project configuration is not up-to-date with pom.xml. Run project configuration update解决方法:项目上右键——【Maven】——【Update Project Configuration……】,此时弹出一个(Update Maven Dependencies)的对话框原创 2018-02-01 16:09:05 · 334 阅读 · 0 评论 -
问题:Eclipse 提示 The given project is not a virtual component project
问题:运行项目时,eclipse提示The given project is not a virtual component project 解决:选择项目右键property > project facets ,选择对应的java版本,应该就ok了。原创 2017-10-12 14:37:15 · 5640 阅读 · 0 评论 -
java中Long类型和long类型的大小比较
在开发过程中老犯一些低级错误,基础还得好好加强啊......今天遇到这样一个问题,我用 "=="来比较两个Long类型的数据,明明数值都相等,可是结果就是false,后来仔细想想,Long在java中是一个引用类型,而long类型是java中的一个基本数据类型,用来表示数值。如果用'=='去比较Long类型数据的话,比较的是它的引用地址,此时即使数值相等,而地址不相同,返回的结果永远是fals原创 2017-10-20 16:44:28 · 9631 阅读 · 0 评论 -
spring报错org.springframework.beans.factory.NoSuchBeanDefinitionException解决办法
spring报错org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.xxx] found for dependency: expected at least 1 bean which qualifies as autowire candidate for原创 2017-09-13 17:58:43 · 41058 阅读 · 1 评论 -
Eclipse进入debug模式提示45s超时的解决办法
问题描述:在Eclipse中启动tomcat的正常模式时,可以对web项目正常的访问,但是要使用debug模式启动这个项目的话,速度开始变得特别慢,一直处于启动状态,没过一会,就会弹出一个提示框(错误如下),提示45s超时。错误:Server Tomcat v8.0 Server at localhost was unable to start within 45 seconds. If th原创 2017-07-25 09:34:35 · 2996 阅读 · 1 评论