- 博客(32)
- 资源 (26)
- 收藏
- 关注
原创 @Autowired注入源码-AutowiredAnnotationBeanPostProcessor
大概流程图AbstractBeanFactoryif (mbd.isSingleton()) { //是否单例 注意下面是否先执行()-> 代码 也就是ObjectFactorysharedInstance = getSingleton(beanName, () -> { //单例情况下 这里会把单例实例放到一级缓存 先调用getSingleton 然后调用createBean try { return createBean(beanName,
2020-08-31 19:36:21 396
原创 redis查看连接数
redis-cli连接服务器# 无密码./redis-cli# 有密码登录./redis-cli -a ${pas}# 切换数据库 默认是0,不用切换select $database查看连接数info clients允许最大连接数config get maxclients具体客户端连接client list...
2020-08-31 13:49:47 9607
原创 elastic-job启动报错
Exception in thread "main" org.apache.shardingsphere.elasticjob.reg.exception.RegException: org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /elastic-job-demo/jobdemo/config at org.apache.shardingspher...
2020-08-27 11:27:29 3177 1
原创 单机部署2个zookeeper报错问题
以前部署了1个zookeeper-3.4.14,由于curator版本问题,现在要用到3.5,下载apache-zookeeper-3.5.8,启动后报错了一开始把dataDir和clientPort改了比如这里报了8080端口被占用问题org.apache.zookeeper.server.admin.AdminServer$AdminServerException: Problem starting AdminServer on address 0.0.0.0, port 8080 and
2020-08-27 11:03:54 457
原创 TreeCache
http://curator.apache.org/curator-recipes/tree-cache.htmlTree CacheDescriptionA utility that attempts to keep all data from all children of a ZK path locally cached. This class will watch the ZK path, respond to update/create/delete events, pull down
2020-08-27 08:47:23 552
原创 PathCache
http://curator.apache.org/curator-recipes/path-cache.htmlDescriptionA Path Cache is used to watch a ZNode. Whenever a child is added, updated or removed, the Path Cache will change its state to contain the current set of children, the children's data a
2020-08-26 19:43:18 318
原创 NodeCache
http://curator.apache.org/curator-recipes/node-cache.htmlParticipating ClassesNodeCache NodeCacheListener ChildDataUsageCreating a NodeChildrenCachepublic NodeCache(CuratorFramework client, String path)Parameters:clie
2020-08-26 19:08:28 909
原创 springboot使用skywalking
skywalking安装参照本篇文章https://blog.csdn.net/kq1983/article/details/108146268复制agent文件从skywalking的agent目录,复制到本地某个目录本地项目打成jar包比如springmvc-1.0-SNAPSHOT.jar启动脚本java -javaagent:D:/skywalking/agent/skywalking-agent.jar -Dskywalking.agent.ser...
2020-08-22 17:34:23 906
原创 skywalking install
本文以8.1.0为例下载地址http://skywalking.apache.org/downloads/解压配置config目录配置文件config/application.yml# 把storage的selector修改一下,默认是h2# 为了方便查看数据,这里使用mysql# 同时要把mysql配置项,都要改掉,比如jdbcUrl、username、password等storage: selector: ${SW_STORAGE:mysql}.
2020-08-21 16:57:49 535
原创 tail
语法# tail 用的最多的就是tail -f filenametail [OPTION]... [FILE]...OPTION-c, --bytes # output the last K bytes; -f # 监视文本 动态显示新增的内容-F # --follow=name --retry 如果再次创建相同的文件名,会继续监视-n, --lines # 查看最后几行 默认10tail -f 和 tail -F...
2020-08-20 18:31:45 228
原创 head
语法head [OPTION]... [FILE]...OPTION# 默认字节bytes 可以指定K、M-c, --bytes# 默认前10行 指定前几行-n, --lines# 显示文件名-v -v
2020-08-20 18:11:57 558
原创 less
语法less [-[+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~] [-b space] [-h lines] [-j line] [-k keyfile] [-{oO} logfile] [-p pattern] [-P prompt] [-t tag] [-T tagsfile] [-x tab,...] [-y lines] [-[z] lines] [-# shift].
2020-08-20 18:01:02 278
原创 wc命令
语法 wc [OPTION]... [FILE]...OPTION-c, --bytes print the byte counts -m, --chars print the character counts -l, --lines print the newline counts -L, --max-line-length print the length of the longest l..
2020-08-20 08:54:33 246
原创 sed命令
语法man sedsed [OPTION]... {script-only-if-no-other-script} [input-file]...参数说明-n, --quiet, --silent 只显示script处理后的结果-e script, --expression=script 以指定的script来执行-f script-file, --file=script-file 以指定的script文件来执行...
2020-08-19 18:50:12 289
原创 maven-assembly-plugin自定义打包
项目工程这里以account打包为例account的target目录下会达成2个包account-$version.SNAPSHOT.jar和 account.tar.gzaccount-$version.SNAPSHOT.jar只包含自己的class,没有依赖包(mvn-parent打出来的所有包,都没有依赖包)最终结果会达成一个account.tar.gz包解压之后的目录目录分析bin这里存放的是启动脚本conf这里存放的是配...
2020-08-18 19:06:05 401
原创 file test -n -z等参数
# 注意# [[ 后面要有个空格,否则会报错# ]] 前面要有个空格,否则会报错if [[ -z "${STR1}" ]]; then echo "str1 is null"else echo "str1=$ISNULL"fi-z 参数[ -z STRING ] 判断字符串长度是否为空STR1=STR2=""STR3=''STR4=NULLif [[ -z "${STR1}" ]]; then echo "str1 is null"fiif [[..
2020-08-18 16:11:55 400
原创 shell获取当前目录的几种方式
方式1:# 通过pwdDIR=$(cd $(dirname $0) && pwd )echo $DIR方式2:# 通过readlinkDIR=$(dirname $(readlink -f $0))echo $DIR
2020-08-18 11:17:15 928
原创 linux命令(readlink)
# 用来找出符号链接所指向的位置readlink /usr/bin/awkreadlink -f /usr/bin/awk没有链接,则不会显示
2020-08-18 10:43:30 1304
原创 mvn参数 -am和-amd区别
项目结构从上图可知,mvn-parent是顶层common和util是各自独立的web是account和order的父级web、account、order都依赖于common和util步骤1# 本地先全量安装mvn clean install步骤2假设这个时候,修改common的内容步骤3步骤3.1本步骤,接步骤2,先给account打包,参数amdmvn install -pl com.kq.mvn:account -amd由于没..
2020-08-17 18:45:20 4205
原创 mvn打指定的module的包
概述项目越做越大,有时候只需要打某个包,即使module之间没有互相依赖,也会打整个项目的包,这样会花费大量的时间mvn clean package 或者 mvn clean install 比如执行上面命令,就会把整个项目打包那么有没有只打某几个相关module的包呢,经过查资源是有的# 执行 主要看-pl -am -amd 几个参数mvn -h例子项目结构从上图可知,mvn-parent是顶层common和util是各自独立的...
2020-08-17 17:36:58 2874
原创 Please install `jdk 1.8` and set `JAVA_HOME` environment variables based on that i
问题执行ssh [email protected] /hello-parent/restart.sh,后报错Please install `jdk 1.8` and set `JAVA_HOME` or `SHR_JDK_HOME`environment variables based on that installation解决方法在远程机器上执行shell脚本没问题,但用ssh远程调用执行,就出现上面问题;原因JAVA_HOME在配置在远程机器的/etc/profile...
2020-08-14 17:37:05 992
原创 apidoc生成文档
相关网址https://apidocjs.com/https://github.com/apidoc/apidochttps://nodejs.org/en/安装nodejs...
2020-08-13 19:30:29 265
原创 NioEventLoop之SelectStrategy
DefaultSelectStrategyFactory 默认Select策略工厂public final class DefaultSelectStrategyFactory implements SelectStrategyFactory { public static final SelectStrategyFactory INSTANCE = new DefaultSelectStrategyFactory(); private DefaultSelectStrateg...
2020-08-11 17:54:12 1116 1
原创 NioEventLoopGroup源码
整体类图参照https://blog.csdn.net/kq1983/article/details/1079126111. thread确定NioEventLoopGroup() 这样的话,默认是cpu的核数*2public NioEventLoopGroup() { this(0);}// MultithreadEventLoopGroup类// 看这里如果thread=0 则默认是DEFAULT_EVENT_LOOP_THREADSprotected Mu.
2020-08-11 17:52:28 250
原创 Bootstrap的register
业务代码// Start the server.ChannelFuture f = b.bind(PORT).sync();AbstractBootstrappublic ChannelFuture bind(SocketAddress localAddress) { validate(); if (localAddress == null) { throw new NullPointerException("localAddress
2020-08-11 17:49:12 529
原创 NioEventLoop源码之openSelector优化
构造函数NioEventLoop(NioEventLoopGroup parent, Executor executor, SelectorProvider selectorProvider, SelectStrategy strategy, RejectedExecutionHandler rejectedExecutionHandler) { super(parent, executor, false, DEFAULT_MAX_PENDING_TA
2020-08-10 18:40:14 476
原创 ChannelHandler
ChannelHandlerChannelHandlerAdapterChannelInboundHandlerChannelInboundHandlerAdapterChannelOutboundHandlerChannelOutboundHandlerAdapter
2020-08-05 08:40:38 254
原创 ChannelHandlerMask实现思路
事件位置从右到左17个位置,每个事件占用1个位置,比如第1个位置1,0001第2个位置2,0010第3个位置4,0100第4个位置8,1000..............................第16个位置32768, 1000 0000 0000 0000(左移15位)第17个位置65536 1 0000 0000 0000 0000 (左移16位)此类推@Skip注解标注Skip的注解会被排除掉,int mask = MASK...
2020-08-04 11:29:27 646
canal.1.1.5包
2022-05-08
seata-server-1.2.0.tar.gz
2020-06-29
navicat_premium12
2019-02-25
how to learn bash third edition
2009-03-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人