Merge remote-tracking branch 'origin/master'
# Conflicts: # skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/Constants.java # skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/model/Span.java # skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/util/ContextGenerator.java
This commit is contained in:
commit
27a2d53a8b
|
|
@ -10,6 +10,6 @@ install:
|
|||
script:
|
||||
- jdk_switcher use oraclejdk8
|
||||
- cd skywalking-network
|
||||
- mvn clean install -Dmaven.test.skip=true
|
||||
- mvn clean install
|
||||
- cd ..
|
||||
- mvn clean install -Dmaven.test.skip=true
|
||||
- mvn clean install
|
||||
|
|
|
|||
47
README.md
47
README.md
|
|
@ -22,23 +22,40 @@ SkyWalking: Large-Scale Distributed Systems Tracing Infrastructure, also known D
|
|||
|
||||
|
||||
# Supported components
|
||||
* web container
|
||||
### web container
|
||||
* Tomcat 7
|
||||
* Tomcat 8
|
||||
|
||||
[](https://hub.docker.com/r/skywalking/docker-tomcat-scenario/tags/)
|
||||
[](https://hub.docker.com/r/skywalking/docker-tomcat-scenario/tags/)
|
||||
[](https://hub.docker.com/r/skywalking/docker-tomcat-scenario/tags/) [](https://hub.docker.com/r/skywalking/docker-tomcat-scenario/tags/)
|
||||
|
||||
* database
|
||||
* mysql
|
||||
* oracle
|
||||
* h2
|
||||
* easily extend to support sybase, sqlserver, jtds, db2, informix
|
||||
* rpc framework
|
||||
* dubbo (tested 2.5.3)
|
||||
* dubbox (tested 2.8.4-dubbo protocol, 2.8.4-rest protocol)
|
||||
* httpClient 4.x
|
||||
* motan (tested 0.1.2)
|
||||
* cache
|
||||
* jedix 2.x
|
||||
|
||||
### database
|
||||
|
||||
* mysql
|
||||
* oracle
|
||||
* h2
|
||||
* easily extend to support sybase, sqlserver, jtds, db2, informix
|
||||
|
||||
[](https://hub.docker.com/r/skywalking/docker-mysql-scenario/tags/) <br/>
|
||||
[](https://hub.docker.com/r/skywalking/docker-oracle-scenario/tags/) <br/>
|
||||
[](https://hub.docker.com/r/skywalking/docker-h2-scenario/tags/)
|
||||
|
||||
|
||||
### rpc framework
|
||||
* dubbo
|
||||
* dubbox
|
||||
* httpClient
|
||||
* motan
|
||||
|
||||
[](https://hub.docker.com/r/skywalking/docker-dubbo-scenario/tags/) <br/>
|
||||
[](https://hub.docker.com/r/skywalking/docker-dubbox-scenario/tags/) [](https://hub.docker.com/r/skywalking/docker-dubbox-scenario/tags/) <br/>
|
||||
[](https://hub.docker.com/r/skywalking/docker-httpclient-scenario/tags/) [](https://hub.docker.com/r/skywalking/docker-httpclient-scenario/tags/) <br/>
|
||||
[](https://hub.docker.com/r/skywalking/docker-motan-scenario/tags/)
|
||||
|
||||
### cache
|
||||
* jedis
|
||||
|
||||
[](https://hub.docker.com/r/skywalking/docker-jedis-scenario/tags/)
|
||||
|
||||
_All test scenarios base on Docker Tech._
|
||||
|
||||
|
|
|
|||
2
pom.xml
2
pom.xml
|
|
@ -14,8 +14,6 @@
|
|||
<module>skywalking-sniffer</module>
|
||||
<module>skywalking-storage-center</module>
|
||||
<module>skywalking-opentracing-kit</module>
|
||||
|
||||
<module>samples/skywalking-example</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get standard environment variables
|
||||
SAMPLE_DUBBO_BIN_PATH=$(cd `dirname $0`; pwd)
|
||||
SAMPLE_DUBBO_CFG_DIR="${SAMPLE_DUBBO_BIN_PATH}/../config"
|
||||
SAMPLE_DUBBO_LIB_DIR="${SAMPLE_DUBBO_BIN_PATH}/../lib"
|
||||
SAMPLE_DUBBO_LOG_DIR="${SAMPLE_DUBBO_BIN_PATH}/../log"
|
||||
|
||||
#echo $SW_SERVER_BIN_DIR
|
||||
#set java home
|
||||
if [ "$JAVA_HOME" != "" ]; then
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
else
|
||||
JAVA=java
|
||||
fi
|
||||
|
||||
CLASSPATH="$SAMPLE_DUBBO_CFG_DIR:$CLASSPATH"
|
||||
|
||||
for i in "${SAMPLE_DUBBO_LIB_DIR}"/*.jar
|
||||
do
|
||||
CLASSPATH="$i:$CLASSPATH"
|
||||
done
|
||||
|
||||
echo "CLASSPATH=$CLASSPATH"
|
||||
|
||||
$JAVA -javaagent:${SAMPLE_DUBBO_BIN_PATH}/../agent/skywalking-agent-2.0-2016.jar -classpath $CLASSPATH com.ai.cloud.skywalking.sample.util.DubboStart
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>example-dubbo</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>dubbo-impl</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>dubbo-impl</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>dubbo-interfaces</artifactId>
|
||||
<version>2.0-2016</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>dubbo</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>3.18.1-GA</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.101tec</groupId>
|
||||
<artifactId>zkclient</artifactId>
|
||||
<version>0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.6.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-dbcp2</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis-spring</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.192</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>RELEASE</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubbo.impl;
|
||||
|
||||
import com.a.eye.skywalking.sample.dubbo.interfaces.SampleDubboInterface;
|
||||
import com.a.eye.skywalking.sample.service.inter.SampleServiceInterface;
|
||||
import com.alibaba.dubbo.config.annotation.Service;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@Service
|
||||
public class SampleDubboInterfaceImpl implements SampleDubboInterface {
|
||||
|
||||
private Logger logger = LogManager.getLogger(SampleDubboInterfaceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private SampleServiceInterface sampleServiceInterface;
|
||||
|
||||
public String callMethodByDubbox(String value) {
|
||||
logger.info("Begin to call service method.");
|
||||
return sampleServiceInterface.saveSampleTable1(value);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.mybatis.dao;
|
||||
|
||||
|
||||
import com.a.eye.skywalking.sample.mybatis.model.Sampletable1;
|
||||
import com.a.eye.skywalking.sample.mybatis.model.Sampletable1Example;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Sampletable1Mapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int countByExample(Sampletable1Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int deleteByExample(Sampletable1Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int deleteByPrimaryKey(String key1);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int insert(Sampletable1 record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int insertSelective(Sampletable1 record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
List<Sampletable1> selectByExample(Sampletable1Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
Sampletable1 selectByPrimaryKey(String key1);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") Sampletable1 record, @Param("example") Sampletable1Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int updateByExample(@Param("record") Sampletable1 record, @Param("example") Sampletable1Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int updateByPrimaryKeySelective(Sampletable1 record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
int updateByPrimaryKey(Sampletable1 record);
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.mybatis.dao;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.a.eye.skywalking.sample.mybatis.model.Sampletable2;
|
||||
import com.a.eye.skywalking.sample.mybatis.model.Sampletable2Example;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface Sampletable2Mapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int countByExample(Sampletable2Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int deleteByExample(Sampletable2Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int deleteByPrimaryKey(String key2);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int insert(Sampletable2 record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int insertSelective(Sampletable2 record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
List<Sampletable2> selectByExample(Sampletable2Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
Sampletable2 selectByPrimaryKey(String key2);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") Sampletable2 record, @Param("example") Sampletable2Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int updateByExample(@Param("record") Sampletable2 record, @Param("example") Sampletable2Example example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int updateByPrimaryKeySelective(Sampletable2 record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
int updateByPrimaryKey(Sampletable2 record);
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.mybatis.model;
|
||||
|
||||
public class Sampletable1 {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column PUBLIC.SAMPLETABLE1.KEY1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
private String key1;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column PUBLIC.SAMPLETABLE1.VALUE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
private String value1;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column PUBLIC.SAMPLETABLE1.KEY1
|
||||
*
|
||||
* @return the value of PUBLIC.SAMPLETABLE1.KEY1
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public String getKey1() {
|
||||
return key1;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column PUBLIC.SAMPLETABLE1.KEY1
|
||||
*
|
||||
* @param key1 the value for PUBLIC.SAMPLETABLE1.KEY1
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public void setKey1(String key1) {
|
||||
this.key1 = key1 == null ? null : key1.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column PUBLIC.SAMPLETABLE1.VALUE1
|
||||
*
|
||||
* @return the value of PUBLIC.SAMPLETABLE1.VALUE1
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public String getValue1() {
|
||||
return value1;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column PUBLIC.SAMPLETABLE1.VALUE1
|
||||
*
|
||||
* @param value1 the value for PUBLIC.SAMPLETABLE1.VALUE1
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public void setValue1(String value1) {
|
||||
this.value1 = value1 == null ? null : value1.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,442 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.mybatis.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Sampletable1Example {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public Sampletable1Example() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andKey1IsNull() {
|
||||
addCriterion("KEY1 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1IsNotNull() {
|
||||
addCriterion("KEY1 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1EqualTo(String value) {
|
||||
addCriterion("KEY1 =", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1NotEqualTo(String value) {
|
||||
addCriterion("KEY1 <>", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1GreaterThan(String value) {
|
||||
addCriterion("KEY1 >", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1GreaterThanOrEqualTo(String value) {
|
||||
addCriterion("KEY1 >=", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1LessThan(String value) {
|
||||
addCriterion("KEY1 <", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1LessThanOrEqualTo(String value) {
|
||||
addCriterion("KEY1 <=", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1Like(String value) {
|
||||
addCriterion("KEY1 like", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1NotLike(String value) {
|
||||
addCriterion("KEY1 not like", value, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1In(List<String> values) {
|
||||
addCriterion("KEY1 in", values, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1NotIn(List<String> values) {
|
||||
addCriterion("KEY1 not in", values, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1Between(String value1, String value2) {
|
||||
addCriterion("KEY1 between", value1, value2, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey1NotBetween(String value1, String value2) {
|
||||
addCriterion("KEY1 not between", value1, value2, "key1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1IsNull() {
|
||||
addCriterion("VALUE1 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1IsNotNull() {
|
||||
addCriterion("VALUE1 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1EqualTo(String value) {
|
||||
addCriterion("VALUE1 =", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1NotEqualTo(String value) {
|
||||
addCriterion("VALUE1 <>", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1GreaterThan(String value) {
|
||||
addCriterion("VALUE1 >", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1GreaterThanOrEqualTo(String value) {
|
||||
addCriterion("VALUE1 >=", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1LessThan(String value) {
|
||||
addCriterion("VALUE1 <", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1LessThanOrEqualTo(String value) {
|
||||
addCriterion("VALUE1 <=", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1Like(String value) {
|
||||
addCriterion("VALUE1 like", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1NotLike(String value) {
|
||||
addCriterion("VALUE1 not like", value, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1In(List<String> values) {
|
||||
addCriterion("VALUE1 in", values, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1NotIn(List<String> values) {
|
||||
addCriterion("VALUE1 not in", values, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1Between(String value1, String value2) {
|
||||
addCriterion("VALUE1 between", value1, value2, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue1NotBetween(String value1, String value2) {
|
||||
addCriterion("VALUE1 not between", value1, value2, "value1");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table PUBLIC.SAMPLETABLE1
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:19:30 CST 2016
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.mybatis.model;
|
||||
|
||||
public class Sampletable2 {
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column PUBLIC.SAMPLETABLE2.KEY2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
private String key2;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column PUBLIC.SAMPLETABLE2.VALUE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
private String value2;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column PUBLIC.SAMPLETABLE2.KEY2
|
||||
*
|
||||
* @return the value of PUBLIC.SAMPLETABLE2.KEY2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public String getKey2() {
|
||||
return key2;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column PUBLIC.SAMPLETABLE2.KEY2
|
||||
*
|
||||
* @param key2 the value for PUBLIC.SAMPLETABLE2.KEY2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public void setKey2(String key2) {
|
||||
this.key2 = key2 == null ? null : key2.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column PUBLIC.SAMPLETABLE2.VALUE2
|
||||
*
|
||||
* @return the value of PUBLIC.SAMPLETABLE2.VALUE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public String getValue2() {
|
||||
return value2;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column PUBLIC.SAMPLETABLE2.VALUE2
|
||||
*
|
||||
* @param value2 the value for PUBLIC.SAMPLETABLE2.VALUE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public void setValue2(String value2) {
|
||||
this.value2 = value2 == null ? null : value2.trim();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,443 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.mybatis.model;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Sampletable2Example {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
protected String orderByClause;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
protected boolean distinct;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public Sampletable2Example() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andKey2IsNull() {
|
||||
addCriterion("KEY2 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2IsNotNull() {
|
||||
addCriterion("KEY2 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2EqualTo(String value) {
|
||||
addCriterion("KEY2 =", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2NotEqualTo(String value) {
|
||||
addCriterion("KEY2 <>", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2GreaterThan(String value) {
|
||||
addCriterion("KEY2 >", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2GreaterThanOrEqualTo(String value) {
|
||||
addCriterion("KEY2 >=", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2LessThan(String value) {
|
||||
addCriterion("KEY2 <", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2LessThanOrEqualTo(String value) {
|
||||
addCriterion("KEY2 <=", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2Like(String value) {
|
||||
addCriterion("KEY2 like", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2NotLike(String value) {
|
||||
addCriterion("KEY2 not like", value, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2In(List<String> values) {
|
||||
addCriterion("KEY2 in", values, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2NotIn(List<String> values) {
|
||||
addCriterion("KEY2 not in", values, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2Between(String value1, String value2) {
|
||||
addCriterion("KEY2 between", value1, value2, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andKey2NotBetween(String value1, String value2) {
|
||||
addCriterion("KEY2 not between", value1, value2, "key2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2IsNull() {
|
||||
addCriterion("VALUE2 is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2IsNotNull() {
|
||||
addCriterion("VALUE2 is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2EqualTo(String value) {
|
||||
addCriterion("VALUE2 =", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2NotEqualTo(String value) {
|
||||
addCriterion("VALUE2 <>", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2GreaterThan(String value) {
|
||||
addCriterion("VALUE2 >", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2GreaterThanOrEqualTo(String value) {
|
||||
addCriterion("VALUE2 >=", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2LessThan(String value) {
|
||||
addCriterion("VALUE2 <", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2LessThanOrEqualTo(String value) {
|
||||
addCriterion("VALUE2 <=", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2Like(String value) {
|
||||
addCriterion("VALUE2 like", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2NotLike(String value) {
|
||||
addCriterion("VALUE2 not like", value, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2In(List<String> values) {
|
||||
addCriterion("VALUE2 in", values, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2NotIn(List<String> values) {
|
||||
addCriterion("VALUE2 not in", values, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2Between(String value1, String value2) {
|
||||
addCriterion("VALUE2 between", value1, value2, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andValue2NotBetween(String value1, String value2) {
|
||||
addCriterion("VALUE2 not between", value1, value2, "value2");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated do_not_delete_during_merge Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table PUBLIC.SAMPLETABLE2
|
||||
*
|
||||
* @mbggenerated Sun Jul 24 09:26:38 CST 2016
|
||||
*/
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.service.impl;
|
||||
|
||||
import com.a.eye.skywalking.sample.mybatis.dao.Sampletable2Mapper;
|
||||
import com.a.eye.skywalking.sample.mybatis.model.Sampletable1;
|
||||
import com.a.eye.skywalking.sample.mybatis.dao.Sampletable1Mapper;
|
||||
import com.a.eye.skywalking.sample.mybatis.model.Sampletable2;
|
||||
import com.a.eye.skywalking.sample.service.inter.SampleServiceInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class SampleServiceImpl implements SampleServiceInterface {
|
||||
|
||||
private Logger logger = LogManager.getLogger(SampleServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private Sampletable1Mapper sampletable1Mapper;
|
||||
|
||||
@Autowired
|
||||
private Sampletable2Mapper sampletable2Mapper;
|
||||
|
||||
public String saveSampleTable1(String value) {
|
||||
String generateKey = UUID.randomUUID().toString();
|
||||
logger.info("Generate key : {}.", generateKey);
|
||||
logger.info("Save to sampletable1");
|
||||
sampletable1Mapper.insert(generateSampleObject1(generateKey,value));
|
||||
logger.info("Save to sampletable2");
|
||||
sampletable2Mapper.insert(generateSampleObject2(generateKey,value));
|
||||
return generateKey;
|
||||
}
|
||||
|
||||
private Sampletable2 generateSampleObject2(String generateKey, String value) {
|
||||
Sampletable2 sampletable2 = new Sampletable2();
|
||||
sampletable2.setKey2(generateKey);
|
||||
sampletable2.setValue2(value);
|
||||
return sampletable2;
|
||||
}
|
||||
|
||||
private Sampletable1 generateSampleObject1(String generateKey, String value) {
|
||||
Sampletable1 sampletable1 = new Sampletable1();
|
||||
sampletable1.setKey1(generateKey);
|
||||
sampletable1.setValue1(value);
|
||||
return sampletable1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.service.inter;
|
||||
|
||||
public interface SampleServiceInterface {
|
||||
|
||||
String saveSampleTable1(String value);
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.util;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
public class DubboStart {
|
||||
|
||||
private static Logger logger = LogManager.getLogger(DubboStart.class);
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:spring-context.xml");
|
||||
context.start();
|
||||
logger.info("Dubbo started success.");
|
||||
while (true){
|
||||
Thread.sleep(60 * 60 * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
CREATE TABLE PUBLIC.sampletable1
|
||||
(
|
||||
key1 VARCHAR2(36) PRIMARY KEY,
|
||||
value1 VARCHAR2(36) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE PUBLIC.sampletable2
|
||||
(
|
||||
key2 VARCHAR2(36) PRIMARY KEY,
|
||||
value2 VARCHAR2(36) NOT NULL
|
||||
);
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration>
|
||||
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern"
|
||||
value="%x %d - %c -%-4r [%t] %-5p %x - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<priority value="debug" />
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
</log4j:configuration>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="debug">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.a.eye.skywalking.sample.mybatis.dao.Sampletable1Mapper">
|
||||
<resultMap id="BaseResultMap" type="com.a.eye.skywalking.sample.mybatis.model.Sampletable1">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
<id column="KEY1" jdbcType="VARCHAR" property="key1" />
|
||||
<result column="VALUE1" jdbcType="VARCHAR" property="value1" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
KEY1, VALUE1
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1Example" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from PUBLIC.SAMPLETABLE1
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from PUBLIC.SAMPLETABLE1
|
||||
where KEY1 = #{key1,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
delete from PUBLIC.SAMPLETABLE1
|
||||
where KEY1 = #{key1,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1Example">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
delete from PUBLIC.SAMPLETABLE1
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
insert into PUBLIC.SAMPLETABLE1 (KEY1, VALUE1)
|
||||
values (#{key1,jdbcType=VARCHAR}, #{value1,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
insert into PUBLIC.SAMPLETABLE1
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="key1 != null">
|
||||
KEY1,
|
||||
</if>
|
||||
<if test="value1 != null">
|
||||
VALUE1,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="key1 != null">
|
||||
#{key1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value1 != null">
|
||||
#{value1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1Example" resultType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
select count(*) from PUBLIC.SAMPLETABLE1
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE1
|
||||
<set>
|
||||
<if test="record.key1 != null">
|
||||
KEY1 = #{record.key1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.value1 != null">
|
||||
VALUE1 = #{record.value1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE1
|
||||
set KEY1 = #{record.key1,jdbcType=VARCHAR},
|
||||
VALUE1 = #{record.value1,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE1
|
||||
<set>
|
||||
<if test="value1 != null">
|
||||
VALUE1 = #{value1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where KEY1 = #{key1,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable1">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:27:32 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE1
|
||||
set VALUE1 = #{value1,jdbcType=VARCHAR}
|
||||
where KEY1 = #{key1,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.a.eye.skywalking.sample.mybatis.dao.Sampletable2Mapper">
|
||||
<resultMap id="BaseResultMap" type="com.a.eye.skywalking.sample.mybatis.model.Sampletable2">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
<id column="KEY2" jdbcType="VARCHAR" property="key2" />
|
||||
<result column="VALUE2" jdbcType="VARCHAR" property="value2" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
KEY2, VALUE2
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2Example" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from PUBLIC.SAMPLETABLE2
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from PUBLIC.SAMPLETABLE2
|
||||
where KEY2 = #{key2,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
delete from PUBLIC.SAMPLETABLE2
|
||||
where KEY2 = #{key2,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2Example">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
delete from PUBLIC.SAMPLETABLE2
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
insert into PUBLIC.SAMPLETABLE2 (KEY2, VALUE2)
|
||||
values (#{key2,jdbcType=VARCHAR}, #{value2,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
insert into PUBLIC.SAMPLETABLE2
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="key2 != null">
|
||||
KEY2,
|
||||
</if>
|
||||
<if test="value2 != null">
|
||||
VALUE2,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="key2 != null">
|
||||
#{key2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value2 != null">
|
||||
#{value2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2Example" resultType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
select count(*) from PUBLIC.SAMPLETABLE2
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE2
|
||||
<set>
|
||||
<if test="record.key2 != null">
|
||||
KEY2 = #{record.key2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.value2 != null">
|
||||
VALUE2 = #{record.value2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE2
|
||||
set KEY2 = #{record.key2,jdbcType=VARCHAR},
|
||||
VALUE2 = #{record.value2,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE2
|
||||
<set>
|
||||
<if test="value2 != null">
|
||||
VALUE2 = #{value2,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where KEY2 = #{key2,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.a.eye.skywalking.sample.mybatis.model.Sampletable2">
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
This element was generated on Sun Jul 24 09:26:38 CST 2016.
|
||||
-->
|
||||
update PUBLIC.SAMPLETABLE2
|
||||
set VALUE2 = #{value2,jdbcType=VARCHAR}
|
||||
where KEY2 = #{key2,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://code.alibabatech.com/schema/dubbo
|
||||
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-sample-dubbo-impl" />
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181" timeout="50000" />
|
||||
<dubbo:protocol name="dubbo" port="20880" />
|
||||
<dubbo:annotation package="com.a.eye.skywalking.sample.dubbo"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<?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:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
|
||||
<!-- 自动扫描 -->
|
||||
<context:component-scan base-package="com.a.eye.skywalking.sample"/>
|
||||
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<!-- 自动扫描mapping.xml文件 -->
|
||||
<property name="mapperLocations" value="classpath:mybatis/*.xml"></property>
|
||||
</bean>
|
||||
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<property name="basePackage" value="com.a.eye.skywalking.sample.mybatis"/>
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
|
||||
</bean>
|
||||
|
||||
<bean id="transactionManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<jdbc:embedded-database id="dataSource" type="H2">
|
||||
<jdbc:script location="classpath:db/sql/create-db.sql" />
|
||||
</jdbc:embedded-database>
|
||||
|
||||
<import resource="classpath*:provider/dubbo-provider.xml"/>
|
||||
</beans>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubbo.impl;
|
||||
|
||||
import com.a.eye.skywalking.sample.dubbo.interfaces.SampleDubboInterface;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
/**
|
||||
* Created by xin on 16/7/31.
|
||||
*/
|
||||
public class SampleDubboInterfaceImplTest {
|
||||
|
||||
@Test
|
||||
public void testSave(){
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("classpath*:consumer/dubbo-consumer.xml");
|
||||
SampleDubboInterface sampleDubboInterface = classPathXmlApplicationContext.getBean(SampleDubboInterface.class);
|
||||
System.out.println(sampleDubboInterface.callMethodByDubbox("Value"));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://code.alibabatech.com/schema/dubbo
|
||||
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
<dubbo:application name="skywalking-sample-dubbo-consumer"/>
|
||||
<dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" timeout="500000"/>
|
||||
<dubbo:reference id="sampleDubboInterface" interface="com.a.eye.skywalking.sample.dubbo.interfaces.SampleDubboInterface"/>
|
||||
</beans>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>example-dubbo</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>dubbo-interfaces</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>dubbo-interfaces</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubbo.interfaces;
|
||||
|
||||
public interface SampleDubboInterface {
|
||||
String callMethodByDubbox(String param1);
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-example</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>example-dubbo</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>example-dubbo</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<modules>
|
||||
<module>dubbo-interfaces</module>
|
||||
<module>dubbo-impl</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/installer/lib</outputDirectory>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
<stripVersion>true</stripVersion>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/installer/lib</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-start-script</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/installer/bin</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>bin</directory>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clean</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${project.build.directory}/installer/agent"/>
|
||||
<mkdir dir="${project.build.directory}/installer/log"/>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-example</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>example-dubbox-rest</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-jaxrs</artifactId>
|
||||
<version>3.0.7.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-client</artifactId>
|
||||
<version>3.0.7.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>1.0.0.GA</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.resteasy</groupId>
|
||||
<artifactId>resteasy-jackson-provider</artifactId>
|
||||
<version>3.0.7.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>8.0.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-logging-juli</artifactId>
|
||||
<version>8.0.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>javax.ws.rs-api</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>dubbox</artifactId>
|
||||
<version>2.8.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>3.20.0-GA</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.101tec</groupId>
|
||||
<artifactId>zkclient</artifactId>
|
||||
<version>0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.192</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubboxrest;
|
||||
|
||||
import com.a.eye.skywalking.sample.dubboxrest.interfaces.IDubboxRestInterA;
|
||||
import com.a.eye.skywalking.sample.dubboxrest.interfaces.param.DubboxRestInterAParameter;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class DubboxRestConsumer {
|
||||
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:consumer/dubbox-rest-consumer.xml");
|
||||
IDubboxRestInterA dubboxRestInterA = context.getBean(IDubboxRestInterA.class);
|
||||
System.out.println(dubboxRestInterA.doBusiness(new DubboxRestInterAParameter("AAAAA")));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubboxrest;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
public class DubboxRestStart {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext =
|
||||
new ClassPathXmlApplicationContext("classpath*:spring-context.xml");
|
||||
classPathXmlApplicationContext.start();
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(100000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubboxrest.impl;
|
||||
|
||||
import com.a.eye.skywalking.sample.dubboxrest.interfaces.IDubboxRestInterA;
|
||||
import com.a.eye.skywalking.sample.dubboxrest.interfaces.param.DubboxRestInterAParameter;
|
||||
import com.alibaba.dubbo.config.annotation.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class DubboxRestInterAImpl implements IDubboxRestInterA {
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
public String doBusiness(DubboxRestInterAParameter paramA) {
|
||||
try {
|
||||
Connection connection = dataSource.getConnection();
|
||||
PreparedStatement preparedStatement =
|
||||
connection.prepareStatement("INSERT INTO PUBLIC.sampletable1(key1,value1) VALUES(?,?)");
|
||||
preparedStatement.setString(1, UUID.randomUUID().toString());
|
||||
preparedStatement.setString(2, paramA.getParameterA());
|
||||
int updateCount = preparedStatement.executeUpdate();
|
||||
return "{\"updateCount\":\"" + updateCount + "\"}";
|
||||
} catch (SQLException e) {
|
||||
return "{\"Message\":\"Update failed\"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubboxrest.interfaces;
|
||||
|
||||
|
||||
import com.a.eye.skywalking.sample.dubboxrest.interfaces.param.DubboxRestInterAParameter;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/rest-a")
|
||||
@Consumes({MediaType.APPLICATION_JSON})
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
|
||||
public interface IDubboxRestInterA {
|
||||
|
||||
@Path("/doBusiness")
|
||||
@POST
|
||||
String doBusiness(DubboxRestInterAParameter paramA);
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.dubboxrest.interfaces.param;
|
||||
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DubboxRestInterAParameter {
|
||||
|
||||
public DubboxRestInterAParameter() {
|
||||
}
|
||||
|
||||
@XmlElement(name = "parameterA")
|
||||
private String parameterA;
|
||||
|
||||
public DubboxRestInterAParameter(String parameterA) {
|
||||
this.parameterA = parameterA;
|
||||
}
|
||||
|
||||
public String getParameterA() {
|
||||
return parameterA;
|
||||
}
|
||||
|
||||
public void setParameterA(String parameterA) {
|
||||
this.parameterA = parameterA;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-consumer"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:reference id="dubboxRestInterA"
|
||||
interface="com.a.eye.skywalking.sample.dubboxrest.interfaces.IDubboxRestInterA"
|
||||
url="rest://127.0.0.1:20880"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
CREATE TABLE PUBLIC.sampletable1
|
||||
(
|
||||
key1 VARCHAR2(36) PRIMARY KEY,
|
||||
value1 VARCHAR2(36) NOT NULL
|
||||
);
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#\u53ca\u65e5\u5fd7\u8f93\u51fa\u7ea7\u522b\uff0c\u5927\u4e8e\u7b49\u4e8e\u8be5\u7ea7\u522b\u7684\u65e5\u5fd7\u5c06\u88ab\u8f93\u51fa\uff08 DEBUG < INFO < WARN < ERROR < FATAL \uff09 \u8bbe\u4e3aOFF\u53ef\u4ee5\u5173\u95ed\u65e5\u5fd7
|
||||
log4j.rootLogger=info, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %l %m%n
|
||||
|
||||
log4j.logger.com.hshbic.cloud.openapi.develop2=INFO
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="error">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
<Console name="Console2" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-dubbo-rest-provider"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:protocol name="rest" port="20880" server="tomcat"/>
|
||||
<bean id="dubboxRestInterA" class="com.a.eye.skywalking.sample.dubboxrest.impl.DubboxRestInterAImpl"/>
|
||||
<dubbo:service interface="com.a.eye.skywalking.sample.dubboxrest.interfaces.IDubboxRestInterA"
|
||||
ref="dubboxRestInterA"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?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:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
|
||||
<!-- 自动扫描 -->
|
||||
<context:component-scan base-package="com.ai.cloud.skywalking.sample"/>
|
||||
|
||||
<jdbc:embedded-database id="dataSource" type="H2">
|
||||
<jdbc:script location="classpath:db/sql/create-db.sql" />
|
||||
</jdbc:embedded-database>
|
||||
|
||||
<import resource="classpath*:provider/dubbox-rest-provider.xml"/>
|
||||
</beans>
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>skywalking-example</artifactId>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<version>2.0-2016</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>example-web</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>example-web Maven Webapp</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp.jstl</groupId>
|
||||
<artifactId>jstl-api</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>4.3.1.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>dubbo-interfaces</artifactId>
|
||||
<version>2.0-2016</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>dubbox</artifactId>
|
||||
<version>2.8.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>3.18.1-GA</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.101tec</groupId>
|
||||
<artifactId>zkclient</artifactId>
|
||||
<version>0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>example-web</finalName>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
package com.a.eye.skywalking.sample.web.controller;
|
||||
|
||||
import com.a.eye.skywalking.sample.dubbo.interfaces.SampleDubboInterface;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/sample")
|
||||
public class SampleWebController {
|
||||
private Logger logger = LogManager.getLogger(SampleWebController.class);
|
||||
@Autowired
|
||||
private SampleDubboInterface sampleDubboInterface;
|
||||
|
||||
@RequestMapping("/normal")
|
||||
public ModelAndView samplePath(){
|
||||
logger.info("Start.....");
|
||||
ModelAndView modelAndView = new ModelAndView("saveSuccess");
|
||||
String generateKey = sampleDubboInterface.callMethodByDubbox(UUID.randomUUID().toString());
|
||||
modelAndView.addObject("key",generateKey);
|
||||
return modelAndView;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://code.alibabatech.com/schema/dubbo
|
||||
http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
<dubbo:application name="skywalking-sample-dubbo-consumer"/>
|
||||
<dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" timeout="50000"/>
|
||||
<dubbo:reference id="sampleDubboInterface" interface="com.a.eye.skywalking.sample.dubbo.interfaces.SampleDubboInterface"/>
|
||||
</beans>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
log4j.rootLogger=DEBUG, A1
|
||||
#log4j.appender.A1=org.apache.log4j.FileAppender
|
||||
#log4j.appender.A1.File=${catalina.base}/logs/mvno_crm_all.log
|
||||
#log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss.SSS} %c %n[%p] %n%m%n
|
||||
|
||||
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss.SSS} %c %n[%p] %n%m%n
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="debug">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
|
||||
|
||||
<context:component-scan base-package="com.a.eye.skywalking.sample.web"></context:component-scan>
|
||||
|
||||
<mvc:annotation-driven></mvc:annotation-driven>
|
||||
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass"
|
||||
value="org.springframework.web.servlet.view.JstlView"/>
|
||||
<property name="prefix" value="/pages/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
|
||||
<import resource="classpath*:consumer/dubbo-consumer.xml"/>
|
||||
</beans>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
version="2.5">
|
||||
<display-name>skywalking-example-web</display-name>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>springMVC</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>classpath*:spring-context.xml</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>springMVC</servlet-name>
|
||||
<url-pattern>/</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<filter>
|
||||
<filter-name>encodingFilter</filter-name>
|
||||
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>encoding</param-name>
|
||||
<param-value>UTF-8</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>forceEncoding</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>encodingFilter</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
|
||||
</web-app>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<h2>Hello World!</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: xin
|
||||
Date: 16/7/24
|
||||
Time: 上午10:29
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Success!!!</title>
|
||||
</head>
|
||||
<body>
|
||||
You have save success!!! KEY:${key}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.a.eye</groupId>
|
||||
<artifactId>skywalking-example</artifactId>
|
||||
<version>2.0-2016</version>
|
||||
|
||||
<modules>
|
||||
<module>example-web</module>
|
||||
<module>example-dubbo</module>
|
||||
<module>example-dubbox-rest</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>skywalking-example</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -11,8 +11,8 @@ message AckSpan {
|
|||
int32 statusCode = 5;
|
||||
string exceptionStack = 6;
|
||||
string viewpointId = 7;
|
||||
string userId = 8;
|
||||
string applicationId = 9;
|
||||
string username = 8;
|
||||
string applicationCode = 9;
|
||||
|
||||
int32 routeKey = 10;
|
||||
}
|
||||
|
|
@ -26,8 +26,8 @@ message RequestSpan {
|
|||
string spanTypeDesc = 6;
|
||||
string callType = 7;
|
||||
uint32 spanType = 8;
|
||||
string applicationId = 9;
|
||||
string userId = 10;
|
||||
string applicationCode = 9;
|
||||
string username = 10;
|
||||
string businessKey = 11;
|
||||
int32 processNo = 13;
|
||||
string address = 14;
|
||||
|
|
@ -35,11 +35,11 @@ message RequestSpan {
|
|||
int32 routeKey = 15;
|
||||
}
|
||||
|
||||
message TraceId{
|
||||
message TraceId {
|
||||
repeated int64 segments = 1;
|
||||
}
|
||||
|
||||
message Span{
|
||||
message Span {
|
||||
TraceId traceId = 1;
|
||||
string levelId = 2; // parentLevelId + "." + levelId
|
||||
string viewpoint = 3;
|
||||
|
|
@ -50,8 +50,8 @@ message Span{
|
|||
string spanTypeDesc = 8;
|
||||
string callType = 9;
|
||||
int32 spanType = 10;
|
||||
string applicationId = 11;
|
||||
string userId = 12;
|
||||
string applicationCode = 11;
|
||||
string username = 12;
|
||||
string businessKey = 13;
|
||||
int32 processNo = 14;
|
||||
string address = 15;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
</repository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}}</shade.net.bytebuddy.target>
|
||||
<shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
|
||||
<shade.package>com.a.eye.skywalking.api.dependencies</shade.package>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<shade.com.lmax.disruptor.source>com.lmax.disruptor</shade.com.lmax.disruptor.source>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.a.eye.skywalking.conf;
|
|||
public class Config {
|
||||
|
||||
public static class SkyWalking {
|
||||
public static String USER_ID = "";
|
||||
public static String USERNAME = "";
|
||||
|
||||
public static String APPLICATION_CODE = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -34,12 +34,12 @@ public class ConfigInitializer {
|
|||
logger.error("Failed to read the config file, sky-walking api run in default config.", e);
|
||||
}
|
||||
}
|
||||
Config.SkyWalking.USER_ID = System.getProperty("userId");
|
||||
Config.SkyWalking.USERNAME = System.getProperty("username");
|
||||
Config.SkyWalking.APPLICATION_CODE = System.getProperty("applicationCode");
|
||||
Config.SkyWalking.SERVERS = System.getProperty("servers");
|
||||
|
||||
if(StringUtil.isEmpty(Config.SkyWalking.USER_ID)){
|
||||
throw new ExceptionInInitializerError("'-DuserId=' is missing.");
|
||||
if(StringUtil.isEmpty(Config.SkyWalking.USERNAME)){
|
||||
throw new ExceptionInInitializerError("'-Dusername=' is missing.");
|
||||
}
|
||||
if(StringUtil.isEmpty(Config.SkyWalking.APPLICATION_CODE)){
|
||||
throw new ExceptionInInitializerError("'-DapplicationCode=' is missing.");
|
||||
|
|
|
|||
|
|
@ -62,22 +62,22 @@ public class Span {
|
|||
/**
|
||||
* 应用编码
|
||||
*/
|
||||
private String applicationId;
|
||||
private String applicationCode;
|
||||
/**
|
||||
* 归属用户
|
||||
*/
|
||||
private String userId;
|
||||
private String username;
|
||||
private String viewPointId;
|
||||
private int routeKey;
|
||||
private int routeKey;
|
||||
|
||||
public Span(TraceId traceId, String applicationId, String userId) {
|
||||
public Span(TraceId traceId, String applicationCode, String username) {
|
||||
this.traceId = traceId;
|
||||
this.applicationId = applicationId;
|
||||
this.userId = userId;
|
||||
this.applicationCode = applicationCode;
|
||||
this.username = username;
|
||||
this.parentLevel = "";
|
||||
}
|
||||
|
||||
public Span(TraceId traceId, String parentLevel, int levelId, String applicationId, String userId, String viewPointId) {
|
||||
public Span(TraceId traceId, String parentLevel, int levelId, String applicationCode, String username) {
|
||||
this.traceId = traceId;
|
||||
this.parentLevel = parentLevel;
|
||||
this.levelId = levelId;
|
||||
|
|
@ -175,20 +175,20 @@ public class Span {
|
|||
this.businessKey = businessKey;
|
||||
}
|
||||
|
||||
public String getApplicationId() {
|
||||
return applicationId;
|
||||
public String getApplicationCode() {
|
||||
return applicationCode;
|
||||
}
|
||||
|
||||
public void setApplicationId(String applicationId) {
|
||||
this.applicationId = applicationId;
|
||||
public void setApplicationCode(String applicationCode) {
|
||||
this.applicationCode = applicationCode;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public void setViewPointId(String viewPointId) {
|
||||
|
|
@ -200,15 +200,15 @@ public class Span {
|
|||
}
|
||||
|
||||
public RequestSpan.Builder buildRequestSpan(RequestSpan.Builder builder) {
|
||||
builder.setTraceId(this.traceId).setParentLevel(this.parentLevel).setLevelId(this.levelId).setSpanType(this.spanType).setApplicationId(this.applicationId)
|
||||
.setUserId(this.userId).setRouteKey(routeKey);
|
||||
builder.setTraceId(this.traceId).setParentLevel(this.parentLevel).setLevelId(this.levelId).setSpanType(this.spanType).setApplicationCode(this.applicationCode)
|
||||
.setUsername(this.username).setRouteKey(routeKey);
|
||||
return builder;
|
||||
}
|
||||
|
||||
public AckSpan.Builder buildAckSpan(AckSpan.Builder builder){
|
||||
builder.setTraceId(this.traceId).setParentLevel(this.parentLevel).setLevelId(this.levelId)
|
||||
.setCost(System.currentTimeMillis() - this.startDate).setStatusCode(this.statusCode)
|
||||
.setExceptionStack(this.exceptionStack).setUserId(this.userId).setApplicationId(this.applicationId)
|
||||
.setExceptionStack(this.exceptionStack).setUsername(this.username).setApplicationCode(this.applicationCode)
|
||||
.setViewpointId(this.viewPointId).setRouteKey(routeKey);
|
||||
return builder;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=false
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
|
||||
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
#自定义本地方法插件是否开启
|
||||
plugin.customlocalmethodinterceptorplugin.is_enable=true
|
||||
#自定义插件拦截的包前缀
|
||||
plugin.customlocalmethodinterceptorplugin.package_prefix=test.com.ai.test.*
|
||||
#自定义插件是否记录入参
|
||||
plugin.customlocalmethodinterceptorplugin.record_param_enable=false
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbo.consumer;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.plugin.test.dubbo.interfaces.IDubboInterA;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class DubboConsumer {
|
||||
|
||||
|
||||
@Test
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"DubboConsumer"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:consumer/dubbo-consumer.xml");
|
||||
IDubboInterA dubboInterA = context.getBean(IDubboInterA.class);
|
||||
dubboInterA.doBusiness("AAAAA");
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "dubbo://127.0.0.1:20880/IDubboInterA.doBusiness(String)", ""}});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbo.impl;
|
||||
|
||||
import com.a.eye.skywalking.plugin.test.dubbo.interfaces.IDubboInterA;
|
||||
import com.alibaba.dubbo.config.annotation.Service;
|
||||
|
||||
@Service
|
||||
public class DubboInterAImpl implements IDubboInterA {
|
||||
public void doBusiness(String paramA) {
|
||||
System.out.println("param : " + paramA);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbo.impl;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class DubboStart {
|
||||
|
||||
@Test
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"DubboStart"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("classpath*:provider/dubbo-provider.xml");
|
||||
|
||||
classPathXmlApplicationContext.start();
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(100000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbo.interfaces;
|
||||
|
||||
|
||||
public interface IDubboInterA {
|
||||
void doBusiness(String paramA);
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox283.consumer;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve;
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.IDubboxRestInterA;
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param.DubboxRestInterAParameter;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class DubboxRestConsumer {
|
||||
private static final Log logger = LogFactory.getLog(DubboxRestConsumer.class);
|
||||
|
||||
@Test
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"DubboxRestConsumer"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
|
||||
new BugFixAcitve();
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:consumer/dubbox283-consumer.xml");
|
||||
IDubboxRestInterA dubboxRestInterA = context.getBean(IDubboxRestInterA.class);
|
||||
dubboxRestInterA.doBusiness(new DubboxRestInterAParameter("AAAAA"));
|
||||
RequestSpanAssert.assertEquals(new String[][] {
|
||||
{"0", "rest://127.0.0.1:20880/IDubboxRestInterA.doBusiness(DubboxRestInterAParameter)", ""}});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox283.consumer;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class DubboxRestStart {
|
||||
|
||||
@Test
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"DubboxRestStart"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
new BugFixAcitve();
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("classpath*:provider/dubbox283-provider.xml");
|
||||
|
||||
classPathXmlApplicationContext.start();
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(100000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox283.impl;
|
||||
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.IDubboxRestInterA;
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param.DubboxRestInterAParameter;
|
||||
import com.alibaba.dubbo.config.annotation.Service;
|
||||
|
||||
@Service
|
||||
public class DubboxRestInterAImpl implements IDubboxRestInterA {
|
||||
public String doBusiness(DubboxRestInterAParameter paramA) {
|
||||
System.out.println("param : " + paramA.getParameterA());
|
||||
return "{\"content\":\"" + paramA.getParameterA() + "\"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox283.interfaces;
|
||||
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param.DubboxRestInterAParameter;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/rest-a")
|
||||
@Consumes({MediaType.APPLICATION_JSON})
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
|
||||
public interface IDubboxRestInterA {
|
||||
|
||||
@Path("/doBusiness")
|
||||
@POST
|
||||
String doBusiness(DubboxRestInterAParameter paramA);
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param;
|
||||
|
||||
import com.a.eye.skywalking.plugin.dubbox.bugfix.below283.SWBaseBean;
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DubboxRestInterAParameter extends SWBaseBean {
|
||||
|
||||
|
||||
public DubboxRestInterAParameter() {
|
||||
}
|
||||
|
||||
@XmlElement(name = "parameterA")
|
||||
private String parameterA;
|
||||
|
||||
public DubboxRestInterAParameter(String parameterA) {
|
||||
this.parameterA = parameterA;
|
||||
}
|
||||
|
||||
public String getParameterA() {
|
||||
return parameterA;
|
||||
}
|
||||
|
||||
public void setParameterA(String parameterA) {
|
||||
this.parameterA = parameterA;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox284.consumer;
|
||||
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param.DubboxRestInterAParameter;
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.plugin.test.dubbox284.interfaces.IDubboxRestInterA;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class DubboxRestConsumer {
|
||||
private static final Log logger = LogFactory.getLog(DubboxRestConsumer.class);
|
||||
|
||||
@Test
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, PluginException {
|
||||
TracingBootstrap.main(new String[] {"DubboxRestConsumer"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException, URISyntaxException, InterruptedException {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:consumer/dubbox284-consumer.xml");
|
||||
IDubboxRestInterA dubboxRestInterA = context.getBean(IDubboxRestInterA.class);
|
||||
dubboxRestInterA.doBusiness(new DubboxRestInterAParameter("AAAAA"));
|
||||
RequestSpanAssert.assertEquals(new String[][] {
|
||||
{"0", "rest://127.0.0.1:20880/IDubboxRestInterA.doBusiness(DubboxRestInterAParameter)", ""}});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox284.consumer;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.dubbox.bugfix.below283.BugFixAcitve;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class DubboxRestStart {
|
||||
|
||||
@Test
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"DubboxRestStart"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
new BugFixAcitve();
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("classpath*:provider/dubbox284-provider.xml");
|
||||
|
||||
classPathXmlApplicationContext.start();
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(100000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox284.impl;
|
||||
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param.DubboxRestInterAParameter;
|
||||
import com.a.eye.skywalking.plugin.test.dubbox284.interfaces.IDubboxRestInterA;
|
||||
import com.alibaba.dubbo.config.annotation.Service;
|
||||
|
||||
@Service
|
||||
public class DubboxRestInterAImpl implements IDubboxRestInterA {
|
||||
public String doBusiness(DubboxRestInterAParameter paramA) {
|
||||
System.out.println("param : " + paramA.getParameterA());
|
||||
return "{\"content\":\"" + paramA.getParameterA() + "\"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox284.interfaces;
|
||||
|
||||
import com.a.eye.skywalking.plugin.test.dubbox283.interfaces.param.DubboxRestInterAParameter;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/rest-a")
|
||||
@Consumes({MediaType.APPLICATION_JSON})
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
|
||||
public interface IDubboxRestInterA {
|
||||
|
||||
@Path("/doBusiness")
|
||||
@POST
|
||||
String doBusiness(DubboxRestInterAParameter paramA);
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.test.dubbox284.interfaces.param;
|
||||
|
||||
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DubboxRestInterAParameter {
|
||||
|
||||
public DubboxRestInterAParameter() {
|
||||
}
|
||||
|
||||
@XmlElement(name = "parameterA")
|
||||
private String parameterA;
|
||||
|
||||
public DubboxRestInterAParameter(String parameterA) {
|
||||
this.parameterA = parameterA;
|
||||
}
|
||||
|
||||
public String getParameterA() {
|
||||
return parameterA;
|
||||
}
|
||||
|
||||
public void setParameterA(String parameterA) {
|
||||
this.parameterA = parameterA;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-consumer"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:reference id="dubboInterA" interface="com.a.eye.skywalking.plugin.test.dubbo.interfaces.IDubboInterA"
|
||||
url="dubbo://127.0.0.1:20880"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-consumer"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:reference id="dubboxRestInterA" interface="com.a.eye.skywalking.plugin.test.dubbox283.interfaces.IDubboxRestInterA"
|
||||
url="rest://127.0.0.1:20880"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-consumer"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:reference id="dubboxRestInterA"
|
||||
interface="com.a.eye.skywalking.plugin.test.dubbox284.interfaces.IDubboxRestInterA"
|
||||
url="rest://127.0.0.1:20880"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#\u53ca\u65e5\u5fd7\u8f93\u51fa\u7ea7\u522b\uff0c\u5927\u4e8e\u7b49\u4e8e\u8be5\u7ea7\u522b\u7684\u65e5\u5fd7\u5c06\u88ab\u8f93\u51fa\uff08 DEBUG < INFO < WARN < ERROR < FATAL \uff09 \u8bbe\u4e3aOFF\u53ef\u4ee5\u5173\u95ed\u65e5\u5fd7
|
||||
log4j.rootLogger=info, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %l %m%n
|
||||
|
||||
log4j.logger.com.hshbic.cloud.openapi.develop2=INFO
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="error">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
<Console name="Console2" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-provider"/>
|
||||
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
|
||||
<dubbo:protocol name="dubbo" port="20880"/>
|
||||
|
||||
<bean id="dubboInterA" class="com.a.eye.skywalking.plugin.test.dubbo.impl.DubboInterAImpl"/>
|
||||
|
||||
<dubbo:service interface="com.a.eye.skywalking.plugin.test.dubbo.interfaces.IDubboInterA" ref="dubboInterA"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-dubbo-rest-provider"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:protocol name="rest" port="20880" server="tomcat"/>
|
||||
<bean id="dubboxRestInterA" class="com.a.eye.skywalking.plugin.test.dubbox283.impl.DubboxRestInterAImpl"/>
|
||||
<dubbo:service interface="com.a.eye.skywalking.plugin.test.dubbox283.interfaces.IDubboxRestInterA"
|
||||
ref="dubboxRestInterA"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?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:dubbo="http://code.alibabatech.com/schema/dubbo"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
|
||||
|
||||
<dubbo:application name="skywalking-dubbo-rest-provider"/>
|
||||
<dubbo:registry address="zookeeper://127.0.0.1:2181"/>
|
||||
<dubbo:protocol name="rest" port="20880" server="tomcat"/>
|
||||
<bean id="dubboxRestInterA" class="com.a.eye.skywalking.plugin.test.dubbox284.impl.DubboxRestInterAImpl"/>
|
||||
<dubbo:service interface="com.a.eye.skywalking.plugin.test.dubbox284.interfaces.IDubboxRestInterA"
|
||||
ref="dubboxRestInterA"/>
|
||||
|
||||
</beans>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=true
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.httpClient.v4;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class TestHttpClientV42 {
|
||||
@Test
|
||||
public void testHttpClient() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"TestHttpClientV42"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException, ClientProtocolException, IOException {
|
||||
// 默认的client类。
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
// 设置为get取连接的方式.
|
||||
HttpGet get = new HttpGet("http://www.baidu.com");
|
||||
try {
|
||||
// 得到返回的response.
|
||||
HttpResponse response = client.execute(get);
|
||||
// 得到返回的client里面的实体对象信息.
|
||||
HttpEntity entity = response.getEntity();
|
||||
if (entity != null) {
|
||||
System.out.println("内容编码是:" + entity.getContentEncoding());
|
||||
System.out.println("内容类型是:" + entity.getContentType());
|
||||
// 得到返回的主体内容.
|
||||
InputStream instream = entity.getContent();
|
||||
try {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(instream, "UTF-8"));
|
||||
System.out.println(reader.readLine());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
instream.close();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
client.getConnectionManager().shutdown();
|
||||
}
|
||||
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "http://www.baidu.com", ""}});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.httpClient.v4;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class TestHttpClientV43 {
|
||||
@Test
|
||||
public void testHttpClient() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"TestHttpClientV43"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
|
||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
||||
// HttpClient
|
||||
CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
|
||||
|
||||
HttpGet httpGet = new HttpGet("http://www.baidu.com");
|
||||
System.out.println(httpGet.getRequestLine());
|
||||
try {
|
||||
// 执行get请求
|
||||
HttpResponse httpResponse = closeableHttpClient.execute(httpGet);
|
||||
// 获取响应消息实体
|
||||
HttpEntity entity = httpResponse.getEntity();
|
||||
// 响应状态
|
||||
System.out.println("status:" + httpResponse.getStatusLine());
|
||||
// 判断响应实体是否为空
|
||||
if (entity != null) {
|
||||
System.out.println("contentEncoding:" + entity.getContentEncoding());
|
||||
System.out.println("response content:" + EntityUtils.toString(entity));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try { // 关闭流并释放资源
|
||||
closeableHttpClient.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "http://www.baidu.com", ""}});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="error">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
<Console name="Console2" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=true
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
package test.a.eye.cloud.skywalking.plugin.drivermanger;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class MyDriver implements Driver {
|
||||
|
||||
private Driver realDriver;
|
||||
|
||||
static {
|
||||
try {
|
||||
DriverManager.registerDriver(new MyDriver());
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public MyDriver() {
|
||||
|
||||
}
|
||||
|
||||
public Driver buildOracleDriver() {
|
||||
if (realDriver == null)
|
||||
realDriver = new oracle.jdbc.OracleDriver();
|
||||
|
||||
return realDriver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Connection connect(String url, Properties info) throws SQLException {
|
||||
System.out.println("MyDriver connect(String url, Properties info)");
|
||||
return buildOracleDriver().connect(url, info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsURL(String url) throws SQLException {
|
||||
System.out.println("MyDriver acceptsURL(String url)");
|
||||
return buildOracleDriver().acceptsURL(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
|
||||
System.out.println("MyDriver getPropertyInfo(String url, Properties info)");
|
||||
return buildOracleDriver().getPropertyInfo(url, info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMajorVersion() {
|
||||
System.out.println("MyDriver getMajorVersion()");
|
||||
return buildOracleDriver().getMajorVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinorVersion() {
|
||||
System.out.println("MyDriver getMinorVersion()");
|
||||
return buildOracleDriver().getMajorVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean jdbcCompliant() {
|
||||
System.out.println("MyDriver jdbcCompliant()");
|
||||
return realDriver.jdbcCompliant();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
System.out.println("MyDriver getParentLogger()");
|
||||
return realDriver.getParentLogger();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package test.a.eye.cloud.skywalking.plugin.drivermanger;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* Created by xin on 16-6-14.
|
||||
*/
|
||||
public class TestMyDriver {
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException {
|
||||
Class.forName("MyDriver");
|
||||
String url = "jdbc:oracle:thin:@10.1.130.239:1521:ora";
|
||||
Connection con = DriverManager.getConnection(url, "edc_export", "edc_export");
|
||||
con.setAutoCommit(false);
|
||||
|
||||
PreparedStatement p0 = con.prepareStatement("select 1 from dual where 1=?");
|
||||
p0.setInt(1, 1);
|
||||
p0.execute();
|
||||
con.commit();
|
||||
con.close();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
package test.a.eye.cloud.skywalking.plugin.h2;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class H2JDBCTest {
|
||||
@Test
|
||||
public void testH2Database() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, PluginException {
|
||||
TracingBootstrap.main(new String[] {H2JDBCTest.class.getName()});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
|
||||
Class.forName("org.h2.Driver");
|
||||
String url = "jdbc:h2:" + H2JDBCTest.class.getResource("/") + "test.db";
|
||||
Connection con = DriverManager.getConnection(url);
|
||||
con.setAutoCommit(false);
|
||||
|
||||
PreparedStatement p0 = con.prepareStatement("select 1 from dual where 1=?");
|
||||
p0.setInt(1, 1);
|
||||
p0.execute();
|
||||
con.commit();
|
||||
con.close();
|
||||
RequestSpanAssert.assertEquals(
|
||||
new String[][] {{"0", "jdbc:h2:" + H2JDBCTest.class.getResource("/") + "test.db" + "(null)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:h2:" + H2JDBCTest.class.getResource("/") + "test.db" + "(null)", "connection.commit"},
|
||||
{"0", "jdbc:h2:" + H2JDBCTest.class.getResource("/") + "test.db" + "(null)", "connection.close"},}, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package test.a.eye.cloud.skywalking.plugin.mysql;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class MysqlJDBCTest {
|
||||
|
||||
@Test
|
||||
public void testMySqlJDBC() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, PluginException {
|
||||
TracingBootstrap.main(new String[] {"MysqlJDBCTest"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
String url = "tracing:jdbc:mysql://127.0.0.1:3306/test?user=root&password=root";
|
||||
Connection con = DriverManager.getConnection(url);
|
||||
con.setAutoCommit(false);
|
||||
|
||||
PreparedStatement p0 = con.prepareStatement("select 1 from dual where 1=?");
|
||||
p0.setInt(1, 1);
|
||||
p0.execute();
|
||||
con.commit();
|
||||
con.close();
|
||||
RequestSpanAssert.assertEquals(
|
||||
new String[][] {{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "connection.commit"},
|
||||
{"0", "jdbc:mysql://127.0.0.1:3306/test?user=root&password=root(null)", "connection.close"},}, true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package test.a.eye.cloud.skywalking.plugin.oracle;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* Created by xin on 16-6-15.
|
||||
*/
|
||||
public class OracleJDBCTest {
|
||||
|
||||
@Test
|
||||
public void testOracleJDBC() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, PluginException {
|
||||
TracingBootstrap.main(new String[] {"OracleJDBCTest"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
|
||||
Class.forName("oracle.jdbc.driver.OracleDriver");
|
||||
String url = "jdbc:oracle:thin:@10.1.130.239:1521:ora";
|
||||
Connection con = DriverManager.getConnection(url, "edc_export", "edc_export");
|
||||
con.setAutoCommit(false);
|
||||
|
||||
PreparedStatement p0 = con.prepareStatement("select 1 from dual where 1=?");
|
||||
p0.setInt(1, 1);
|
||||
p0.execute();
|
||||
con.commit();
|
||||
con.close();
|
||||
RequestSpanAssert.assertEquals(
|
||||
new String[][] {{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "preaparedStatement.executeUpdate:select 1 from dual where 1=?"},
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "connection.commit"},
|
||||
{"0", "jdbc:oracle:thin:@10.1.130.239:1521:ora(edc_export)", "connection.close"},}, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=true
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
|
||||
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.jedis.v2;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
import redis.clients.jedis.HostAndPort;
|
||||
import redis.clients.jedis.JedisCluster;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class JedisClusterTest {
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"com.a.eye.skywalking.plugin.jedis.v2.JedisClusterTest"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
|
||||
JedisCluster jedisCluster = new JedisCluster(getHostAndPorts());
|
||||
jedisCluster.set("11111", "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111");
|
||||
RequestSpanAssert.assertEquals(new String[][] {
|
||||
// 根据实际情况进行修改
|
||||
{"0.0", "127.0.0.1:7001 set", "key=11111"}, {"0", "127.0.0.1:7002;127.0.0.1:7001;127.0.0.1:7000;127.0.0.1:7005;127.0.0.1:7004;127.0.0.1:7003; set", "key=11111"},});
|
||||
|
||||
}
|
||||
|
||||
private static Set<HostAndPort> getHostAndPorts() {
|
||||
Set<HostAndPort> redisEnv = new HashSet<HostAndPort>();
|
||||
redisEnv.add(new HostAndPort("127.0.0.1", 7000));
|
||||
redisEnv.add(new HostAndPort("127.0.0.1", 7001));
|
||||
redisEnv.add(new HostAndPort("127.0.0.1", 7002));
|
||||
redisEnv.add(new HostAndPort("127.0.0.1", 7003));
|
||||
redisEnv.add(new HostAndPort("127.0.0.1", 7004));
|
||||
redisEnv.add(new HostAndPort("127.0.0.1", 7005));
|
||||
return redisEnv;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.jedis.v2;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
import redis.clients.jedis.Jedis;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class JedisTest {
|
||||
public void test() throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {"JedisTest"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException {
|
||||
Jedis jedis = null;
|
||||
try {
|
||||
jedis = new Jedis("127.0.0.1", 6379);
|
||||
jedis.set("11111", "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111");
|
||||
RequestSpanAssert.assertEquals(new String[][] {{"0", "127.0.0.1:6379 set", "key=11111"},});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
jedis.close();
|
||||
}
|
||||
}
|
||||
|
||||
public void testNormal() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, InterruptedException {
|
||||
JedisTest.main(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="error">
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
<Console name="Console2" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="Console" />
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
#是否打印数据
|
||||
buriedpoint.printf=true
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.motan;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import com.a.eye.skywalking.testframework.api.RequestSpanAssert;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/**
|
||||
* Created by xin on 16/9/27.
|
||||
*/
|
||||
public class Client {
|
||||
@Test
|
||||
public void test()
|
||||
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {Client.class.getName()});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:motan_client.xml");
|
||||
FooService service = (FooService) ctx.getBean("remoteService");
|
||||
System.out.println(service.hello("motan", "1"));
|
||||
RequestSpanAssert
|
||||
.assertEquals(new String[][] {{"0", "motan://localhost:8002/com.a.eye.skywalking.plugin.motan.FooService.hello(java.lang.String,java.lang.String)?group=default_rpc", ""}});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.motan;
|
||||
|
||||
public interface FooService {
|
||||
public String hello(String name, String value);
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.motan;
|
||||
|
||||
/**
|
||||
* Created by xin on 16/9/27.
|
||||
*/
|
||||
public class FooServiceImpl implements FooService {
|
||||
|
||||
public String hello(String name, String value) {
|
||||
System.out.println(name + " invoked rpc service");
|
||||
return "hello " + name + " " + value;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package com.a.eye.skywalking.plugin.motan;
|
||||
|
||||
import com.a.eye.skywalking.plugin.PluginException;
|
||||
import com.a.eye.skywalking.plugin.TracingBootstrap;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class Server {
|
||||
@Test
|
||||
public void test()
|
||||
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException,
|
||||
PluginException {
|
||||
TracingBootstrap.main(new String[] {Server.class.getName()});
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:motan_server.xml");
|
||||
System.out.println("server start...");
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(100000L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
<?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:motan="http://api.weibo.com/schema/motan"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://api.weibo.com/schema/motan http://api.weibo.com/schema/motan.xsd">
|
||||
|
||||
<!-- reference to the remote service -->
|
||||
<motan:referer id="remoteService" interface="com.a.eye.skywalking.plugin.motan.FooService"
|
||||
directUrl="localhost:8002"/>
|
||||
</beans>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?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:motan="http://api.weibo.com/schema/motan"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://api.weibo.com/schema/motan http://api.weibo.com/schema/motan.xsd">
|
||||
|
||||
<!-- service implemention bean -->
|
||||
<bean id="serviceImpl" class="com.a.eye.skywalking.plugin.motan.FooServiceImpl"/>
|
||||
<!-- exporting service by motan -->
|
||||
<motan:service interface="com.a.eye.skywalking.plugin.motan.FooService" ref="serviceImpl" export="8002"/>
|
||||
</beans>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#skyWalking用户ID
|
||||
skywalking.user_id=123
|
||||
#skyWalking应用编码
|
||||
skywalking.application_code=test
|
||||
#skywalking auth的环境变量名字
|
||||
skywalking.auth_system_env_name=SKYWALKING_RUN
|
||||
#skywalking数据编码
|
||||
skywalking.charset=UTF-8
|
||||
skywalking.auth_override=true
|
||||
|
||||
#是否打印数据
|
||||
buriedpoint.printf=true
|
||||
#埋点异常的最大长度
|
||||
buriedpoint.max_exception_stack_length=4000
|
||||
#业务字段的最大长度
|
||||
buriedpoint.businesskey_max_length=300
|
||||
#过滤异常
|
||||
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
|
||||
|
||||
#最大发送者的连接数阀比例
|
||||
sender.connect_percent=100
|
||||
#发送服务端配置
|
||||
sender.servers_addr=127.0.0.1:34000
|
||||
#最大发送的副本数量
|
||||
sender.max_copy_num=2
|
||||
#发送的最大长度
|
||||
sender.max_send_length=20000
|
||||
#当没有Sender时,尝试获取sender的等待周期
|
||||
sender.retry_get_sender_wait_interval=2000
|
||||
|
||||
#最大消费线程数
|
||||
consumer.max_consumer=0
|
||||
#消费者最大等待时间
|
||||
consumer.max_wait_time=5
|
||||
#发送失败等待时间
|
||||
consumer.consumer_fail_retry_wait_interval=50
|
||||
|
||||
#每个Buffer的最大个数
|
||||
buffer.buffer_max_size=18000
|
||||
#Buffer池的最大长度
|
||||
buffer.pool_size=5
|
||||
|
||||
#发送检查线程检查周期
|
||||
senderchecker.check_polling_time=200
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue