Skip to content

Instantly share code, notes, and snippets.

View bohrqiu's full-sized avatar

bohr bohrqiu

View GitHub Profile
@bohrqiu
bohrqiu / cxf_client_timeout_config
Last active January 1, 2016 23:19
cxf client timeout configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:p="http://www.springframework.org/schema/p" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd"
@bohrqiu
bohrqiu / maven-package-verson
Last active December 31, 2015 19:58
maven打包时,自动生成静态资源版本号
1.在web项目pom里面添加build插件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<includes>
@bohrqiu
bohrqiu / jetty
Last active December 31, 2015 19:49
java web项目测试时启动jetty
1.在项目父pom中添加build插件:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.1.0.v20131115</version>
<configuration>
<reload>automatic</reload>
</configuration>
</plugin>
@bohrqiu
bohrqiu / dump.sh
Last active December 22, 2015 19:19
java进程关闭时收集dump
JAVA_HOME=/usr/lib/jvm/java-7-sun
OUTPUT_HOME=/var/log/webapps/cs/
DEPLOY_HOME=/usr/local/apache-tomcat-7.0.26-cs
HOST_NAME=`hostname`
DUMP_PIDS=`ps --no-heading -C java -f --width 1000 | grep "$DEPLOY_HOME" |awk '{print $2}'`
if [ -z "$DUMP_PIDS" ]; then
echo "The server $HOST_NAME is not started!"
exit 1;
fi
@bohrqiu
bohrqiu / gist:5503811
Created May 2, 2013 17:24
druid slf4j日志集成
diff --git a/src/main/java/com/alibaba/druid/support/logging/LogFactory.java b/src/main/java/com/alibaba/druid/support/logging/LogFactory.java
index dbdc21a..fe6f467 100644
--- a/src/main/java/com/alibaba/druid/support/logging/LogFactory.java
+++ b/src/main/java/com/alibaba/druid/support/logging/LogFactory.java
@@ -23,9 +23,7 @@
private static Constructor logConstructor;
static {
- // TODO add slf4j logging
-