自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 收藏
  • 关注

原创 -bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_US.UTF-8): No such file or directory

Linux登录之后报编码问题,编辑配置文件时中文乱码系统:centos7Last login: Tue Mar 23 18:02:44 2021 from 10.1.18.96-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_US.UTF-8): No such file or directory-bash: warning: setlocale: LC_COLLATE: cannot change locale (zh_US

2021-03-25 09:50:42 643

翻译 kkfileview文件预览docker部署

参考官方文档:https://kkfileview.keking.cn/zh-cn/docs/production.html拉取镜像docker pull keking/kkfileview运行docker run -itd --name kkfileview -p 8012:8012 keking/kkfileview修改配置文件find / -name application.properties找到了多个配置文件,因为不确定哪个才是,所以都修改掉了。vim 找到的文件。修改fi

2021-03-25 09:46:06 2630

转载 Error querying database. Cause: java.sql.SQLSyntaxErrorException: In aggregated query without GROUP

异常:Error querying database. Cause: java.sql.SQLSyntaxErrorException: In aggregated query without GROUP BY, expression #5 of SELECT list contains nonaggregated column 'road_tunnel_test.a.id'; this is incompatible with sql_mode=only_full_group_by参考:https

2021-03-05 09:45:09 3659 2

原创 git不同分支回滚

环境idea+git+gitlab操作本地切换要回滚代码所在分支执行命令 $ git log ##复制要回滚到的那个版本的版本号 $ git reset --hard f546077f7ac6330a1d52587792b39377dd3cb9d8 $ git push origin HEAD --force如果要回滚其他分支的代码,需要先切换分支。注意:该操作需要谨慎操作。...

2021-01-06 10:58:45 321

原创 idea如何push单个指定commit到指定分支

一:环境idea+gitLab分支为dev、test、mst二:问题本地dev分支的bug修复需要紧急提交到mst,新开发的功能还未测试,不提交mst。假设:本地Dev分支commit and push新开发功能A 到远端Dev分支,生成记录versionA。commit and push紧急上线功能B到远端dev分支,生成记录versionB。如何将versionB需要提交并push到远程mst分支。三:解决方式1、Dev本地修改功能B,commit and push到远程Dev分支,

2021-01-06 10:10:33 16116

原创 阿里云语音通知java实现

1、环境描述jdk1.8+springboot2、阿里云短信服务地址https://dyvms.console.aliyun.com/overview/home3、已完成企业资质认证4、添加语音模板,审核通过采用的是短信语音方式,公共号池号码外呼。采用的是先发送后计费的方式,账号已充值。5、在pom.xml中引入jar包配置 <dependency> <groupId>com.aliyun</groupId>

2020-12-25 17:01:14 2559 2

原创 创建git分支,分支合并

1、gitLab上已有代码,分支为主分支master2、创建分支dev与test(1)、打开gitLab中项目-选择【pepository】-【branches】-【new branch】完成创建分支。(2)分支创建完成后打开ieda,更新项目,可以看到上面创建的远程分支。选择某个远程分支,点击右侧箭头,选择【Checkout As …】从远程分支检出本地分支选择要开发的本地分支,点击右箭头,选择【checkout】切换为当前本地分支。(3)合并假设:当前在【dev】分支上开发

2020-08-10 11:16:17 250

转载 springmvc配置多数据源

参考:https://www.cnblogs.com/haha12/p/10613549.html背景项目中需要访问本地及阿里云2个数据库。环境为springmvc、mybatis、mysql、配置了tk.mybatis.mapper。datasource.xml配置<bean id="dataSourceTargetA" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="clo..

2020-05-28 16:40:45 280

原创 本地项目上传至gitlab

1、登录gitLab2、创建新组3、进入创建的组下,创建项目4、根据指令将本地的项目上传到gitLab打开项目所在文件夹,打开git bash here执行命令git config --global user.name "xx"git config --global user.email "xxxx.com"git initgit remote add origin 项目的gitLab路径git add .git commit -m "Initial commit"

2020-05-20 15:24:49 365

翻译 Mysql错误1205:Lock wait timeout exceeded

SHOW FULL PROCESSLISTselect * from information_schema.innodb_trx;kill trx_mysql_thread_id

2020-05-20 14:44:41 169

原创 使用vs code启用vue项目

一 环境git.exenode.js注意检查环境变量配置。检查方式:cmdVS Code开发软件二 用git clone项目打开vs code,Ctril+~快捷键打开命令窗口,打开到要下载项目的位置,例如:输入命令git clone 项目git地址下载项目。下载完成后,...

2020-04-20 18:33:40 6014

原创 Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was

Error during WebSocket handshake: Sent non-empty ‘Sec-WebSocket-Protocol’ header but no response was received环境:springBoot vue 前后端分离 websocket通信前端访问后端时需要传入token,传入后,后端返回时未设置请求头,导致异常。前端部分:websock =...

2019-12-07 11:12:08 2534

转载 返回参数中null转成“”

项目中接口返回参数时,字符串会出现null情况,前端判断比较困难,可以通过后端配置的方式解决。项目中用的是fastJson。参考地址:https://www.cnblogs.com/zf29506564/p/6669870.html<!-- 增加返回配置 字符串|数字为Null时返回""|0 --> <mvc:annotation-driven enable-matrix-...

2019-10-31 11:00:49 353

转载 tomcat的websocket实现

环境jdk1.8、tomcat8、浏览器谷歌77、IE11websocket的实现有2种方式,一种为tomcat的websocket,比较简单,tomcat要求7以上,低版本浏览器可能有兼容问题,未测试。另外一种为spring整合websocket,spring的版本要求4.x以上,可以通过socketjs实现低版本浏览器兼容,参考地址:https://blog.csdn.net/weixin...

2019-10-29 09:42:08 926

翻译 git相关

一、下载安装git git下载地址:[https://git-scm.com/downloads](https://git-scm.com/downloads) 其他参考下载地址:[https://www.liaoxuefeng.com/wiki/896043488029600/896067074338496](https://www.liaoxuefeng.com/wiki/89604348...

2019-10-18 16:38:50 143

原创 JSON相关

一、字符串数组转换成LIst方式一//import com.alibaba.fastjson.JSONArray;String string = (String) request.getSession().getAttribute("test");//string 的值为 ["72","73","74","75","79"]List<String> strLislt...

2019-10-17 16:43:45 125

原创 String相关

带逗号分隔的String字符串转换成List String str = “3,4,5,6,” if(str .endsWith(",")){ str = str .substring(0, str .length()-1); } List<String> strList = Arrays.asList(str.split(","));...

2019-10-17 13:48:50 103

原创 poi 4.1导出excel

一、pom.xml配置 <!-- https://mvnrepository.com/artifact/org.apache.poi/poi fx--> <!-- 使用xls格式时、只要导入poi-version-yyyymmdd.jar --> <dependency> <groupId>org.apache.poi&...

2019-09-19 16:11:47 1814 2

原创 POI 4.1导入Excel

一、pom.xml配置 <!-- https://mvnrepository.com/artifact/org.apache.poi/poi fx--> <!-- 使用xls格式时、只要导入poi-version-yyyymmdd.jar --> <dependency> <groupId>org.apache.poi</gr...

2019-09-19 16:09:41 1099

转载 httpClient配置使用

使用原因:为了建立2个项目的通讯配置: <!-- httpclient的接口 --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <ver...

2019-09-19 15:54:27 622

转载 spring+springMVC整合webSocket

一、pom.xml <spring.version>4.1.6.RELEASE</spring.version> <!-- webSocket 开始 --> <dependency> <groupId>org.springframework</groupId> &l...

2019-09-18 17:56:19 2150

原创 mysql日期函数

一、取当前日期select SYSDATE() from dual; //2019-08-20 17:52:30select NOW() from dual;//2019-08-20 17:52:46select CURDATE() from dual;//2019-08-20二、取某个日期加减时间select DATE_ADD(SYSDATE(),INTERVAL 210 MIN...

2019-08-20 17:55:36 137

原创 spring定时任务重复执行2遍问题

异常:同一个定时任务,重复执行。解决方式:tomcat配置文件server.xml修改。修改前配置: <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false"> <Valve className="org.apache.ca...

2019-08-20 16:18:28 309

原创 Eclipse Mars 导入svn项目(maven、web项目)配置启动

一.环境搭建准备eclipse Mars2、jdk1.8环境并测试、tomcat8、maven、svn插件 等工具配置环境二、eclipse 配置jdkwindow-perferences-java-Installed JREs–配置jdk环境三、导入svn项目1安装svn插件2.window—show view --other–找到svn,如下3.打开资源库后,右键单击输...

2019-06-13 14:51:29 960

原创 idea 导入SVN项目(maven,web项目),配置启动

一导入svn项目选择目录,检出选择你的版本二、项目导入成功后1.配置maven,用了本地的maven,配置如下:File-setting-本地maven配置阿里云镜像,及本地仓库如下:镜像配置如下: <mirror> <id>alimaven</id> <name>aliyun maven</...

2019-06-13 13:47:42 4394

原创 阿里云短信发送实现

一、配置pom.xml文件<!-- 添加以下依赖安装阿里云Java SDK核心库 --> <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <versi...

2019-05-31 11:05:51 2199

原创 com.aliyuncs.exceptions.ClientException: InvalidVersion : Specified parameter Version is not valid

一 异常如下:com.aliyuncs.exceptions.ClientException: InvalidVersion : Specified parameter Version is not validRequestId : C76118B6-DB57-4BC1-B8F0-BE13E525A677 at com.aliyuncs.DefaultAcsClient.getCommonR...

2019-05-31 10:41:59 13081 5

原创 MyBatis+MySQL 如何执行多条更新语句

一.Mapper.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="com.d...

2019-05-30 10:52:46 1832

原创 SpringMVC配置定时任务

一、配置文件增加配置 <!--添加定时任务 --> <task:annotation-driven/>二、给接口添加定时任务@Componentpublic class ScheduleAction extends BaseAction{protected final Logger logger = LoggerFactory.getLogger(thi...

2019-05-30 10:45:02 164

原创 java web 如何访问本地图片

一.配置tomcat 虚拟路径1.打开tomcat 安装路径 apache-tomcat-8.0.49\conf 包下文件server.xml2.添加虚拟路径,context可以设置多个<Host name="localhost" appBase="webapps8" unpackWARs="true" autoDeploy="true"> &l...

2019-05-16 16:09:56 3649

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除