SpringBoot多数据源 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.0.6</version></dependency><dependency> <groupId>com.baomidou</groupId&.
es kibana painless 修改字段值 POST indexname/typename/_update_by_query{ "script":{ "lang":"painless", "source":"if (ctx._source.colname == null) {ctx._source.colname = 0.00}" }}POST indexname/typename/_update_by_query{ "script":{ "lang":"painless", "sourc.
dockerfile FROM openjdk:8-jdk-alpineMAINTAINER "hftest"ADD xxx.jar xxx.jarCMD exec java -jar xxx.jarEXPOSE 8080
java nio 拷贝文件 public static void main(String[] args) { try { FileChannel in = new FileInputStream("C:/Download/k8s.rar").getChannel(); FileChannel out = new FileOutputStream("C:/Download/k8s-nio.rar").getChannel(); // 连接两...
mongodb聚合查询 聚合查询import java.math.BigDecimal;import java.util.List;import java.util.Map;import java.util.Objects;import java.util.stream.Collectors;import javax.annotation.Resource;import org.apache.commons.lang3.StringUtils;import org.springframework.data.mo
springboot cache package com.sgcc.eip.cable.common.config;import java.nio.ByteBuffer;import java.nio.charset.StandardCharsets;import java.time.Duration;import java.util.Collection;import java.util.Collections;import java.util.Map;import java.util.Optional;import.
shell启动jar脚本 #!/bin/bashserviceName=$1path=`pwd`pid=`ps -ef | grep ${path}/${serviceName}.jar | grep -v grep | cut -c 9-15`if [[ "${pid}" -gt "0" ]]; then echo "存在" echo "停止" `kill -9 ${pid}`else echo "不存在"fi`nohup java -jar.
ExecutorService实现多线程demo import org.redisson.Redisson;import org.redisson.api.RLock;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.scheduling.annotation.EnableScheduling;import .
Redisson分布式锁+定时任务 import org.redisson.Redisson;import org.redisson.config.Config;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.autoconfigure.data.redis.RedisProperties;import org.springframework.context.annotation.Bean;i.
java8 HashMap源码 public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable { //数组+链表+红黑树 private static final long serialVersionUID = 3...