自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 资源 (4)
  • 问答 (1)
  • 收藏
  • 关注

原创 spring boot异步执行@Async

1.一般异步执行,使用多线程,或者消息中间件完成2.spring boot@Async可以让方法异步执行package com.example.demo;import org.springframework.scheduling.annotation.Async;import org.springframework.stereotype.Component;import jav...

2018-09-17 23:00:18 170

转载 spring boot定时任务

1.一般的定时任务Timer,Quartz2.spring boot更加便捷的注解方式启动定时任务在启动类添加@EnableScheduling其次新建一个class类package com.example.demo.test1;import org.springframework.scheduling.annotation.Scheduled;import org....

2018-09-16 15:02:04 159

原创 java优化(一)

1.使用clone复制对象,尽量不使用new去新建对象package com.example.demo.Test;public class test2 implements Cloneable{ private static test2 t=new test2(); public static test2 getnewtest2() { try { ...

2018-09-09 13:57:03 260

转载 redis命令总结

1.禁止keys命令使用因为会阻塞服务器,建议使用scan 0查看键。scan 0 match f*,查看f开头的键2.slowlogslowlog get 5获取慢查询5条3.在redis.conf禁用命令添加rename-command keys keysys4.查看最大的键值./redis-cli --bigkeys5../redis-cli monitor ...

2018-09-07 11:27:24 115

转载 java异步执行之线程池

java异步执行可以使用线程,或者第三方消息中间件,如mq线程池的使用:1)Executors来创建线程池ExecutorService cachePool = Executors.newCachedThreadPool(); for (int i=1;i<=10;i++){ cachePool.execute(task); ...

2018-09-04 16:17:25 10768

转载 mybaties批量插入

@Testpublic void testInsertBatch() throws Exception { long start = System.currentTimeMillis(); List<User> list = new ArrayList<>(); User user; for (int i = 0; i < 1000...

2018-09-03 17:33:09 901

转载 shell对nginx状态,mysql的查看

1.nginx状态,它本来就有状态检查的模板这里使用之间访问nginx 的网页,如果是200则成功,其他则提示失败curl -m 5 -s -w %{http_code} 127.0.0.1:8080 -o /dev/null上面是tomcat 的,nginx的链接换下就行  ...

2018-09-02 22:48:34 509

转载 shell批量解压tar.gz tgz

cd /root/home/ls *.tar.gz > ls.logls *.tgz >> ls.logfor i in $( cat ls.log )dotar -zxf $i & > /dev/nulldonerm -rf ls.log& > /dev/null是让输出的东西不要显示出来...

2018-09-02 11:39:25 2000 1

spring boot和mybatis整合小项目

spring boot和mybatis整合小项目,仅供参考..............................................................................................

2018-01-08

基于dwr的java推送小项目

基于dwr的java推送小项目,做了部分修改,可以发送文字以及英文,网页直接访问jsp资源即可,打开多个网页查看推送的效果,部分摘自网络,仅供参考和学习

2017-10-07

基于dwr的java推送慕课小项目

基于dwr的java推送慕课小项目,修改部分代码,使得可以发送文字,英文字母,仅供参考,学习

2017-10-07

基于dwr的java推送消息慕课小项目

基于dwr的java推送消息慕课小项目,部分jar包,代码摘自网络,供参考,一起学习

2017-10-07

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

TA关注的人

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