摘要:
主要是 这里的疑惑两点:T1(主线程) T2(将要join到T1的线程a)wait() 一开始认为是阻塞调用join方法的线程,但这是不对的,这里的wait是调用的T1(主线程),而不是在T2的run()方法内的wait(),so...,b)既然有wait那应该有notify或者notifyall才 阅读全文
摘要:
ok fine you win/ 网上有些人观点是native方法可以不用去管,有个观点帮助到我“取决于厂商的具体实现” 但谷歌翻译。。。于是我去有道🤣给出的例句中的意思“对实现做出决定时发生”, 那看来就是notify方法具体要看实现方式。继续找notify的源码,得出的结果是由hostspot 阅读全文
摘要:
遇到的问题:原先在springboot启动类中添加叻@ComponentScan并且没有扫描@Configuration中的类,导致redisTemplate配置失败,添加扫描路径即可。 阅读全文
摘要:
1.重启某个端口,适用于如tomcat重启8080端口,根据lsof命令查出,通过grep获取指定行, awk获取到指定列进而得出pid值关闭即可. pid=`lsof -i:3001|grep -v 'PID'|grep -w '(LISTEN)'|awk '{print $2}' ` echo 阅读全文
摘要:
1安装完ngnix后 在sbin文件夹对ngnix操作/ 1 ./ngnix //启动 2 ./ngnix -s stop 3 ./ngnix -s reload 4 losf -i:80 //查看相关的ngnix进程/ 5 kill -9 (pid) 2坑: 配置完不起作用一直停留在welcome 阅读全文
摘要:
ElasticSearch 在搜索中文是。首先通过KI分词/KI分词是吧所有的中文分解成单个中文, 在每次通过term搜索中文时,不会将体育两次分词,但ElasticSearch里面保存的都是单个中文,所以导致未搜索到数据。 在通过搜索“体”字时即可搜到。 阅读全文
摘要:
Map可用TreeMap 自动[]排序 List 可用Collections.sort方法实现 Collections.sort(allCompanys,new Comparator(){ public int compare(PrpLremoteLook p1,PrpLremoteLook p2){ if(Integer.parseInt(p1.getComCode... 阅读全文
摘要:
配置pom.xml 安装必要的jar包 配置log4j.properties 配置Webxml 添加ServletContextListener 添加监听类log4jInit 阅读全文
摘要:
安装mysql客户端: yum install mysql 安装mysql 服务器端: yum install mysql-server yum install mysql-devel mysql_install_db --user=mysql --ldata=/var/lib/mysql/ 阅读全文
摘要:
安装mysql客户端: yum install mysql 安装mysql 服务器端: yum install mysql-server yum install mysql-devel mysql_install_db --user=mysql --ldata=/var/lib/mysql/ 阅读全文