
踩坑经历
牧码ya
这个作者很懒,什么都没留下…
展开
-
Eclipse中Console无法显示全部日志问题
Eclipse中Console无法显示全部日志问题原创 2020-10-24 10:29:53 · 2571 阅读 · 1 评论 -
使用Xftp6上传文件显示状态错误
问题在使用Xftp6上传文件到VMware中的CentOS6.5中时一直失败:网上说法是目录权限的问题解决通过chmod命令修改目录权限。比如我现在需要将jdk安装包上传到CentOS下/usr/local/java目录下,现在就需要将/usr/local/java目录权限进行修改# 进入上一级目录cd /usr/local# 修改java目录权限chmod 777 java/再次进行上传,成功...原创 2020-07-18 08:50:57 · 1236 阅读 · 1 评论 -
git常用命名汇总
常用将本地项目初始化# $ git init# 给项目添加远程仓库$ git remote add origin git@github.xxx.git# 本地分支和远程分支建立联系(使用git branch -vv 可以查看本地分支和远程分支的关联关系)$ git branch --set-upstream-to=origin/远程分支 本地分支 查看# 查看工作...原创 2019-06-23 18:50:21 · 2538 阅读 · 0 评论 -
git push报错:The current branch master has no upstream branch
问题进行git push操作时报错:fatal: The current branch master has no upstream branch.**原因:**没有将本地的分支与远程仓库的分支进行关联通过git branch查看本地分支只有master通过git branch -a查看远程分支,有master和remotes/origin/master两个这时由于远程仓库太多,且...原创 2019-06-23 18:49:20 · 10209 阅读 · 0 评论 -
POI导入Excel异常Cannot get a text value from a numeric cell
问题POI操作Excel时偶尔会出现Cannot get a text value from a numeric cell的异常错误java.lang.IllegalStateException: Cannot get a text value from a numeric cell异常原因:Excel数据cell有不同的类型,当我们试图从一个数字类型的Cell读取出一个字符串并写入数据...原创 2019-04-23 17:37:03 · 461 阅读 · 0 评论 -
SpringBoot使用 thymeleaf+@RestController 跳转页面
thymeleaf推荐使用@Controller进行页面跳转如果用@RestController,则可以通过ModelAndView进行页面跳转eg/** * 跳转到goods_editor.html页面 * @return */@GetMapping("/goodsEditor")public ModelAndView goodsEditor(){ ModelAndView m...原创 2019-03-19 10:19:37 · 4577 阅读 · 0 评论 -
org.xml.sax.SAXParseException: 元素类型 "link" 必须由匹配的结束标记 "</link>" 终止
问题SpringBoot使用thymeleaf模板引擎时报错:org.xml.sax.SAXParseException: 元素类型 “link” 必须由匹配的结束标记 “</link>” 终止。or:org.xml.sax.SAXParseException: 元素类型 “meta” 必须由匹配的结束标记 “</meta>” 终止解决解决方法是在pom...原创 2019-03-19 10:02:05 · 6015 阅读 · 0 评论 -
MySQL中datetime类型的字段与JavaBean对应的类型
MySQL数据库中时间格式为datetime类型的字段:JavaBean中对应字段类型:import com.fasterxml.jackson.annotation.JsonFormat;import org.springframework.format.annotation.DateTimeFormat;// 如果到的是sql下的包(java.sql.Date),get操作时封装的结...原创 2019-03-22 11:50:18 · 24196 阅读 · 3 评论 -
Swagger异常:java.lang.NumberFormatException: For input string: ""
问题项目整合Swagger,访问Swagger首页时后台抛出下面异常:i.s.m.p.AbstractSerializableParameter : Illegal DefaultValue null for parameter type integerjava.lang.NumberFormatException: For input string: “”原因好像是说swagg...原创 2019-03-25 14:36:14 · 2139 阅读 · 1 评论 -
通过MyBatis向MySQL中插入数据时中文乱码
问题:通过MyBatis向MySQL中插入或更新操作时,中文会显示成???解决:在配置文件application.yml中连接数据库的地址url后面加上characterEncoding=utf8即可spring: application: name: server # 服务名称 datasource: driverClassName: com.mysql.jdbc...原创 2019-03-18 14:20:50 · 1343 阅读 · 0 评论 -
上传图片415异常:"Content type 'multipart/form-data;' .... not supported"
问题上传图片时报错:Content type ‘multipart/form-data;boundary=----WebKitFormBoundarypOpfYxCGU6Q4sciA;charset=UTF-8’ not supportedController层:@PostMapping(path = "/uploadRotationImg")public ResponseEnti...原创 2019-03-25 10:23:04 · 16651 阅读 · 8 评论 -
SpringBoot中MyBatis属性映射之开启驼峰命名
MyBatis默认是属性名和数据库字段名一一对应的,即数据库表列:user_name实体类属性:user_name但是java中一般使用驼峰命名数据库表列:user_name实体类属性:userName在SpringBoot中,可以通过设置map-underscore-to-camel-case属性为true来开启驼峰功能:mybatis: configuration: ...原创 2019-03-20 14:43:26 · 6034 阅读 · 0 评论 -
原生js修改textarea的值
// 设置textarea的值document.getElementById("goodstext_id").value = "值";原创 2019-03-19 15:56:17 · 13790 阅读 · 0 评论 -
A component required a bean of type 'com.renqijie.dao.SellerMapper' that could not be found.
异常:Description:A component required a bean of type ‘com.renqijie.dao.SellerMapper’ that could not be found.原因:dao类SellerMapper未加注解@org.apache.ibatis.annotations.Mapper...原创 2019-03-14 17:53:11 · 6275 阅读 · 3 评论 -
org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON
记一次踩坑经历:Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.Js...原创 2019-03-14 11:52:15 · 8664 阅读 · 0 评论