- 博客(17)
- 收藏
- 关注
转载 Centos 安装Java多种方式
安装jdk(介绍三种方法)查看java版本:java -version方法一:利用yum源来安装jdk(此方法不需要配置环境变量)查看yum库中的java安装包 :yum -y list java*安装需要的jdk版本的所有java程序:yum -y install java-1.8.0-openjdk* (安装完之后,默认的安装目录是在: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64)方法二:用rpm安装jdk (默认安
2022-05-18 19:41:49 15293 1
原创 sonarLint配置修改
前提:安装sonarLint1.打开idea setting -> Tools -> SonarLint2.点击加号“+”,输入sonar服务连接名,选择SonarQube并填入服务器地址2.点击 next ,选择token或者账户密码登录2.1 token登录:点击creatToken,自动进入sonarQube,点击创建令牌,将令牌复制到输入框即可,点击next完成配置2.1 账户密码登录输入账户密码登录登录即可...
2022-05-13 14:47:57 1441
原创 CentOS7宝塔安装命令
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
2022-02-17 17:10:30 854
转载 YYYY-MM-dd 使用有误
public class DateTest { public static void main(String[] args) { Calendar calendar = Calendar.getInstance(); calendar.set(2019, Calendar.AUGUST, 31); Date strDate = calendar.getTime(); DateFormat formatUpperCase = new S.
2021-12-30 09:46:33 206
转载 2021-12-7 mysql往数据库表中某一行某一字段追加内容
使用CONCAT()函数mysql向表中某字段后追加一段字符串(field为字段名):update table_name set field=CONCAT(field,'str',)mysql 向表中某字段前加字符串update table_name set field=CONCAT('str',field)转载于:https://www.cnblogs.com/wonker/p/10449409.html...
2021-12-07 16:04:54 961
转载 Java并发编程:volatile关键字解析(转载)
Java并发编程:volatile关键字解析原文链接:http://www.cnblogs.com/dolphin0520/p/3920373.html作者:Matrix海子 出处:http://www.cnblogs.com/dolphin0520/
2021-11-02 11:45:34 110
转载 2021-10-28 docker stop 和 docker kill 的区别
docker stop 与 docker kill 均可以将容器停掉,但二者究竟有什么区别呢?首先,摘录一下官网对这两个功能的描述:docker stop: Stop a running container (send SIGTERM, and then SIGKILL after grace period) […] The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL.
2021-10-28 13:58:22 2192
原创 2021-7-26 yarn : 无法加载文件 D:\Program Files\nodejs\node_global\yarn.ps1,因为在此系统上禁止运 行脚本。
2021-07-26 10:01:00 698
原创 2021-7.23 BigDecimal工具类
import java.math.BigDecimal;/** * 用于高精确处理常用的数学运算 */public class ArithmeticUtils { //默认除法运算精度 private static final int DEF_DIV_SCALE = 10; /** * 提供精确的加法运算 * * @param v1 被加数 * @param v2 加数 * @return 两个参数的和 */
2021-07-23 10:53:18 120
原创 2021-07-21 response.setContentType(“image/png“);失效问题
旧: byte[] buffer = new byte[2048]; int c = 0; while ((c = fis.read(buffer)) != -1){ toClient.write(buffer,0,c); } response.reset(); // 设置response的Header //response.addHeader("Content-Length", "" + file.l
2021-07-21 16:15:07 1461
原创 mysql 查询近7日 近6月数据
mysql 查询近7日 近6月数据日活 近7日 select a.time,ifnull(b.value,0) as valuefrom ( SELECT curdate() as time union all SELECT date_sub(curdate(), interval 1 day) as clickdate union all SELECT date_sub(curdate(), interval 2 day) as clickdate
2021-02-22 09:45:36 334
原创 2020-09-17 @Transactional 中手动回滚事务
注解@Transactional事务中有了try块,当捕获到异常后需要手动回滚事务手动回滚代码如下:TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
2020-09-17 16:50:32 210
原创 2020-09-02 docker权限不足
docker imagesGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/images/json: dial unix /var/run/docker.sock: connect: permission denied原因:权限不足,使用docker需要
2020-09-02 13:40:19 518
原创 2020-09-01 mysql 根据日期分组查询
根据日期分组查询DATE_FORMAT(view_time,"%Y-%m") AS time from foots where is_delete = '1' and create_by = #{userId} GROUP BY DATE_FORMAT(view_time,"%Y-%m")使用group by 查询字段与分组字段一致 SELECT b.* FROM ( SELECT t.*, DATE_FORMAT( t.view
2020-09-01 14:32:24 173
原创 2020-8-31 收藏一个api 日历用
https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?query=2020%E5%B9%B408%E6%9C%88&resource_id=6018&format=json
2020-08-31 15:44:23 260 2
原创 2020-8-14 bug修复-mapper.xml
使用mybatis过程中 mapper.xml中的if判断需求:查询状态为2时,查询出状态为2,4,5的数据:当传入的参数为String类型的数字时,错误示范: <if test="state!=null and state!='' and state.toString()!='2'"> AND a.catastate = #{state} </if> <if test="state!=null and state!='' and '
2020-08-14 09:37:31 193
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人