`
文章列表

限速器

    博客分类:
  • java
package test.date; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import com.google.common.util.concurrent.RateLimiter; /** * http://developer.51cto.com/art/201510/495062.htm ** ...

Maven SCOPE

    博客分类:
  • java
在Maven的依赖管理中,经常会用到依赖的scope设置。这里整理下各种scope的使用场景和说明,以及在使用中的实践心得。 scope的使用场景和说明 1.compile 编译范围,默认scope,在工程环境的classpath(编译环境)和打包(如果是W ...

maven 跳过test

mvn install -Dmaven.test.skip=true

Twitter snowFlake

    博客分类:
  • java
package com.netty.test.netty4.tool; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class IdWorker { protected static final Logger LOG = LoggerFactory.getLogger(IdWorker.class); private long workerId; private long datacenterId; private long sequence = 0L; priv ...
public void test() throws ClassNotFoundException { Class<?> clazz = Class.forName("com.netty.test.netty4.tool.StaticClass"); ClassLoader cl = Thread.currentThread().getContextClassLoader(); clazz = cl.loadClass("com.netty.test.netty4.tool.StaticClass"); Str ...
https://github.com/spring-projects/spring-boot/blob/v1.3.3.RELEASE/spring-boot-samples/spring-boot-sample-web-jsp/pom.xml

获取IP地址

    博客分类:
  • java
import java.net.Inet4Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframewo ...
http://java-performance.info/hashcode-method-performance-tuning/

Nexus

    博客分类:
  • java
2、创建解压目录,并将apache-maven-3.0-bin.tar.gz文件解压到指定目录 Java代码 #cd /opt #mkdir maven #chown -R configer:configer /opt/maven #chmod 755 /opt/maven #su -l configer #tar -zvxf apache-maven-3.0-bin.tar.gz 2、配置环境变量 Java代码 #vi /home/configer/.bash ...

Chain

    博客分类:
  • java
public static void main(String[] args) { new MessageBuilder().newTopic("MessageTopic").with(new CustomeMessageHandler()).newQueue("MessageQueue").with(new CustomeMessageHandler()); } public static class MessageBuilder { Map<String, MessageHandler> topics = ne ...

Spring Boot

    博客分类:
  • java
package com; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplicat ...

Windows权限控制

1.进入“控制面版”-->“管理工具”-->“本地安全策略”-->“安全选项” 2.在右边窗口找到“网络访问:本地帐户的共享和安全模式” 4.修改为:"经典...." 5.然后去我的电脑,进入磁盘属性窗口的“安全”标签, 点“添加” 点“高级” 点“立即查找” 选择“Administrators","everyone"和Users”等 为“Administrators”组分配“完全控制”的权限 “Users”组 或用默认的 6.点击“应用”就可以恢复了 7.其他磁盘同理

查看文件大小linux

du -h --max-depth=1 work/testing

JAVA Seriesization

    博客分类:
  • java
http://www.th7.cn/Program/Android/201503/412139.shtml http://blog.csdn.net/zhaozheng7758/article/details/7820018 http://www.javacodegeeks.com/2010/07/java-best-practices-high-performance.html

centOS 设置时间

date -s "2016-08-15 15:19:00" hwclock -w 或 hwclock --systohc
Global site tag (gtag.js) - Google Analytics