move https://github.com/apache/servicecomb-java-chassis/tree/master/samples to https://github.com/apache/servicecomb-samples
diff --git a/java-chassis-samples/README.md b/java-chassis-samples/README.md
new file mode 100644
index 0000000..08d8450
--- /dev/null
+++ b/java-chassis-samples/README.md
@@ -0,0 +1,10 @@
+# samples
+
+It's the samples of Java chassis
+1. pojo sample
+2. jaxrs sample
+3. spring mvc sample
+4. code first sample
+5. customer handler sample
+6. extend metrics health checker sample
+7. write metrics data into separate text files sample
\ No newline at end of file
diff --git a/java-chassis-samples/apm-agent/pom.xml b/java-chassis-samples/apm-agent/pom.xml
new file mode 100644
index 0000000..3e16a6a
--- /dev/null
+++ b/java-chassis-samples/apm-agent/pom.xml
@@ -0,0 +1,98 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.servicecomb.samples</groupId>
+  <artifactId>apm-agent</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+  <name>Java Chassis::Samples::apm-agent</name>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <java.version>1.8</java.version>
+
+    <argLine>-Dfile.encoding=UTF-8</argLine>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>java-chassis-dependencies</artifactId>
+        <version>${project.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-rest-common</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>3.1.0</version>
+        <executions>
+          <execution>
+            <id>default-jar</id>
+            <phase>package</phase>
+          </execution>
+        </executions>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Premain-Class>org.apache.servicecomb.samples.apm.AgentMain</Premain-Class>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+          <compilerArgs>
+            <arg>-Werror</arg>
+            <arg>-Xlint:all</arg>
+          </compilerArgs>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/AgentMain.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/AgentMain.java
new file mode 100644
index 0000000..213c790
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/AgentMain.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm;
+
+import java.lang.instrument.Instrumentation;
+
+public class AgentMain {
+  public static void premain(String args, Instrumentation inst) {
+    // to support web container, we can not just only inject spiJar to system classloader
+    // in this sample, javaAgent jar equals ServiceComb plugin jar
+    inst.addTransformer(
+        new SCBClassFileTransformer(AgentMain.class.getProtectionDomain().getCodeSource().getLocation()));
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/SCBClassFileTransformer.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/SCBClassFileTransformer.java
new file mode 100644
index 0000000..ae6d8cf
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/SCBClassFileTransformer.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm;
+
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.ProtectionDomain;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class SCBClassFileTransformer implements ClassFileTransformer {
+  private static final Logger LOGGER = Logger.getLogger(SCBClassFileTransformer.class.getName());
+
+  private volatile boolean loaded;
+
+  private URL scbSpiJar;
+
+  public SCBClassFileTransformer(URL scbSpiJar) {
+    this.scbSpiJar = scbSpiJar;
+  }
+
+  @Override
+  public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
+      ProtectionDomain protectionDomain, byte[] classfileBuffer) {
+    if (!loaded && className.startsWith("org/apache/servicecomb")) {
+      injectSPI(loader);
+    }
+    return classfileBuffer;
+  }
+
+  private synchronized void injectSPI(ClassLoader loader) {
+    if (loaded) {
+      return;
+    }
+
+    try {
+      Method addURLMethod = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
+      addURLMethod.setAccessible(true);
+      addURLMethod.invoke(loader, scbSpiJar);
+      loaded = true;
+    } catch (Throwable e) {
+      LOGGER.log(Level.SEVERE,
+          String.format("Failed to inject %s to classLoader %s.", scbSpiJar, loader.getClass().getName()), e);
+    }
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmBootListener.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmBootListener.java
new file mode 100644
index 0000000..7ad4284
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmBootListener.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl;
+
+import org.apache.servicecomb.core.BootListener;
+import org.apache.servicecomb.core.event.InvocationBusinessMethodFinishEvent;
+import org.apache.servicecomb.core.event.InvocationBusinessMethodStartEvent;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.event.InvocationStartEvent;
+import org.apache.servicecomb.samples.apm.impl.output.AbstractOutputGenerator;
+import org.apache.servicecomb.samples.apm.impl.output.ConsumerOutputGenerator;
+import org.apache.servicecomb.samples.apm.impl.output.EdgeOutputGenerator;
+import org.apache.servicecomb.samples.apm.impl.output.HeaderOutputGenerator;
+import org.apache.servicecomb.samples.apm.impl.output.ProducerOutputGenerator;
+
+import com.google.common.eventbus.AllowConcurrentEvents;
+import com.google.common.eventbus.Subscribe;
+
+public class ApmBootListener implements BootListener {
+  private AbstractOutputGenerator headerOutputGenerator = new HeaderOutputGenerator();
+
+  private AbstractOutputGenerator consumerOutputGenerator = new ConsumerOutputGenerator();
+
+  private AbstractOutputGenerator producerOutputGenerator = new ProducerOutputGenerator();
+
+  private AbstractOutputGenerator edgeOutputGenerator = new EdgeOutputGenerator();
+
+  @AllowConcurrentEvents
+  @Subscribe
+  public void onInvocationStart(InvocationStartEvent event) {
+    ApmContext apmContext = new ApmContext();
+    apmContext.setTraceId(event.getInvocation().getTraceId());
+    event.getInvocation().addLocalContext("apm", apmContext);
+  }
+
+  @AllowConcurrentEvents
+  @Subscribe
+  public void onInvocationBusinessStart(InvocationBusinessMethodStartEvent event) {
+    ApmContext apmContext = event.getInvocation().getLocalContext("apm");
+    ApmContextUtils.setApmContext(apmContext);
+  }
+
+  @AllowConcurrentEvents
+  @Subscribe
+  public void onInvocationBusinessFinish(InvocationBusinessMethodFinishEvent event) {
+    ApmContextUtils.removeApmContext();
+  }
+
+  /**
+   * in real APM implementation: create span and so on for stages
+   * @param event
+   */
+  @AllowConcurrentEvents
+  @Subscribe
+  public void onInvocationFinish(InvocationFinishEvent event) {
+    StringBuilder sb = new StringBuilder();
+    headerOutputGenerator.generate(sb, event);
+    if (event.getInvocation().isConsumer()) {
+      if (event.getInvocation().isEdge()) {
+        edgeOutputGenerator.generate(sb, event);
+      } else {
+        consumerOutputGenerator.generate(sb, event);
+      }
+    } else {
+      producerOutputGenerator.generate(sb, event);
+    }
+    System.out.println(sb.toString());
+  }
+
+  @Override
+  public void onBootEvent(BootEvent event) {
+    if (EventType.BEFORE_HANDLER.equals(event.getEventType())) {
+      event.getScbEngine().getEventBus().register(this);
+    }
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmContext.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmContext.java
new file mode 100644
index 0000000..9ab46ae
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmContext.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl;
+
+public class ApmContext {
+  private String traceId;
+
+  public String getTraceId() {
+    return traceId;
+  }
+
+  public void setTraceId(String traceId) {
+    this.traceId = traceId;
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmContextUtils.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmContextUtils.java
new file mode 100644
index 0000000..3fd8cb0
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/ApmContextUtils.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl;
+
+public class ApmContextUtils {
+  private static ThreadLocal<ApmContext> threadApmContext = new ThreadLocal<>();
+
+  public static ApmContext getApmContext() {
+    return threadApmContext.get();
+  }
+
+  public static ApmContext getAndRemoveApmContext() {
+    ApmContext context = threadApmContext.get();
+    if (context != null) {
+      threadApmContext.remove();
+    }
+    return context;
+  }
+
+  public static void setApmContext(ApmContext apmContext) {
+    threadApmContext.set(apmContext);
+  }
+
+  public static void removeApmContext() {
+    threadApmContext.remove();
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/AbstractOutputGenerator.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/AbstractOutputGenerator.java
new file mode 100644
index 0000000..9c731a2
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/AbstractOutputGenerator.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl.output;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+
+import com.google.common.base.Strings;
+
+public abstract class AbstractOutputGenerator {
+  static final String PAD2_KEY11_FMT = generateFmt(2, 11);
+
+  static final String PAD2_TIME_FMT = generateTimeFmt(2);
+
+  static final String PAD4_TIME_FMT = generateTimeFmt(4);
+
+  static final String PAD6_TIME_FMT = generateTimeFmt(6);
+
+  protected static String generateFmt(int leftPad, int keyLen) {
+    return Strings.repeat(" ", leftPad) + "%-" + keyLen + "s: %s\n";
+  }
+
+  protected static String generateTimeFmt(int leftPad) {
+    return Strings.repeat(" ", leftPad) + "%-" + (27 - leftPad) + "s: %.3fms\n";
+  }
+
+  protected void appendLine(StringBuilder sb, String fmt, String headerKey, Object value) {
+    sb.append(String.format(fmt, headerKey, value));
+  }
+
+  protected void appendTimeLine(StringBuilder sb, String fmt, String headerKey, double nano) {
+    sb.append(String.format(fmt, headerKey, nano / TimeUnit.MILLISECONDS.toNanos(1)));
+  }
+
+  abstract public void generate(StringBuilder sb, InvocationFinishEvent event);
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/ConsumerOutputGenerator.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/ConsumerOutputGenerator.java
new file mode 100644
index 0000000..12e35ff
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/ConsumerOutputGenerator.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl.output;
+
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.invocation.InvocationStageTrace;
+
+public class ConsumerOutputGenerator extends AbstractOutputGenerator {
+  @Override
+  public void generate(StringBuilder sb, InvocationFinishEvent event) {
+    InvocationStageTrace stageTrace = event.getInvocation().getInvocationStageTrace();
+
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.HANDLERS_REQUEST, stageTrace.calcHandlersRequestTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.CLIENT_FILTERS_REQUEST,
+        stageTrace.calcClientFiltersRequestTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.CONSUMER_SEND_REQUEST, stageTrace.calcSendRequestTime());
+    appendTimeLine(sb, PAD6_TIME_FMT, InvocationStageTrace.CONSUMER_GET_CONNECTION, stageTrace.calcGetConnectionTime());
+    appendTimeLine(sb, PAD6_TIME_FMT, InvocationStageTrace.CONSUMER_WRITE_TO_BUF, stageTrace.calcWriteToBufferTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.CONSUMER_WAIT_RESPONSE,
+        stageTrace.calcReceiveResponseTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.CONSUMER_WAKE_CONSUMER, stageTrace.calcWakeConsumer());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.CLIENT_FILTERS_RESPONSE,
+        stageTrace.calcClientFiltersResponseTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.HANDLERS_RESPONSE, stageTrace.calcHandlersResponseTime());
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/EdgeOutputGenerator.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/EdgeOutputGenerator.java
new file mode 100644
index 0000000..5beb10d
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/EdgeOutputGenerator.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl.output;
+
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.invocation.InvocationStageTrace;
+
+public class EdgeOutputGenerator extends ConsumerOutputGenerator {
+  @Override
+  public void generate(StringBuilder sb, InvocationFinishEvent event) {
+    InvocationStageTrace stageTrace = event.getInvocation().getInvocationStageTrace();
+
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.THREAD_POOL_QUEUE, stageTrace.calcThreadPoolQueueTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.SERVER_FILTERS_REQUEST,
+        stageTrace.calcServerFiltersRequestTime());
+
+    super.generate(sb, event);
+
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.SERVER_FILTERS_RESPONSE,
+        stageTrace.calcServerFiltersResponseTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.PRODUCER_SEND_RESPONSE, stageTrace.calcSendResponseTime());
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/HeaderOutputGenerator.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/HeaderOutputGenerator.java
new file mode 100644
index 0000000..4ee3570
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/HeaderOutputGenerator.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl.output;
+
+import org.apache.servicecomb.common.rest.RestConst;
+import org.apache.servicecomb.common.rest.definition.RestOperationMeta;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.invocation.InvocationStageTrace;
+
+public class HeaderOutputGenerator extends AbstractOutputGenerator {
+  @Override
+  public void generate(StringBuilder sb, InvocationFinishEvent event) {
+    Invocation invocation = event.getInvocation();
+    RestOperationMeta restOperationMeta = invocation.getOperationMeta().getExtData(RestConst.SWAGGER_REST_OPERATION);
+    InvocationStageTrace stageTrace = event.getInvocation().getInvocationStageTrace();
+
+    sb.append(invocation.getInvocationQualifiedName()).append(":\n");
+    appendLine(sb, PAD2_KEY11_FMT, "http method", restOperationMeta.getHttpMethod());
+    appendLine(sb, PAD2_KEY11_FMT, "url", restOperationMeta.getAbsolutePath());
+    appendLine(sb, PAD2_KEY11_FMT, "status code", event.getResponse().getStatusCode());
+    appendLine(sb, PAD2_KEY11_FMT, "traceId", invocation.getTraceId());
+
+    appendTimeLine(sb, PAD2_TIME_FMT, "total", stageTrace.calcTotalTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.PREPARE, stageTrace.calcInvocationPrepareTime());
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/ProducerOutputGenerator.java b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/ProducerOutputGenerator.java
new file mode 100644
index 0000000..1b6250f
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/java/org/apache/servicecomb/samples/apm/impl/output/ProducerOutputGenerator.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apm.impl.output;
+
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.core.invocation.InvocationStageTrace;
+
+public class ProducerOutputGenerator extends AbstractOutputGenerator {
+  @Override
+  public void generate(StringBuilder sb, InvocationFinishEvent event) {
+    Invocation invocation = event.getInvocation();
+    InvocationStageTrace stageTrace = invocation.getInvocationStageTrace();
+
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.THREAD_POOL_QUEUE, stageTrace.calcThreadPoolQueueTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.SERVER_FILTERS_REQUEST,
+        stageTrace.calcServerFiltersRequestTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.HANDLERS_REQUEST, stageTrace.calcHandlersRequestTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, invocation.getOperationMeta().getSchemaQualifiedName(),
+        stageTrace.calcBusinessTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.HANDLERS_RESPONSE, stageTrace.calcHandlersResponseTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.SERVER_FILTERS_RESPONSE,
+        stageTrace.calcServerFiltersResponseTime());
+    appendTimeLine(sb, PAD4_TIME_FMT, InvocationStageTrace.PRODUCER_SEND_RESPONSE, stageTrace.calcSendResponseTime());
+  }
+}
diff --git a/java-chassis-samples/apm-agent/src/main/resources/META-INF/services/org.apache.servicecomb.core.BootListener b/java-chassis-samples/apm-agent/src/main/resources/META-INF/services/org.apache.servicecomb.core.BootListener
new file mode 100644
index 0000000..e0efc73
--- /dev/null
+++ b/java-chassis-samples/apm-agent/src/main/resources/META-INF/services/org.apache.servicecomb.core.BootListener
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.servicecomb.samples.apm.impl.ApmBootListener
\ No newline at end of file
diff --git a/java-chassis-samples/auth-sample/README.md b/java-chassis-samples/auth-sample/README.md
new file mode 100644
index 0000000..e199f05
--- /dev/null
+++ b/java-chassis-samples/auth-sample/README.md
@@ -0,0 +1,100 @@
+## Auth-Sample
+
+To make sure the security between the interfaces of services, users can enable `RSA Authorizaiton` by simple configuration as below.
+
+## Consumer Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>handler-publickey-auth</artifactId>
+   </dependency>
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+    # other configurations omitted
+    handler:
+      chain:
+        Consumer:
+          default: auth-consumer
+  ```
+
+## Provider Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>handler-publickey-auth</artifactId>
+   </dependency>
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+    # other configurations omitted
+    handler:
+      chain:
+        Consumer:
+          default: auth-provider
+  ```
+
+## Sample Quick Start
+
+Auth sample use `RestTemplate` to present RSA communication between provider and consumer.
+
+1. Start the ServiceComb/Service Center
+
+   - [how to start the service center](http://servicecomb.apache.org/users/setup-environment/#)
+   - make sure service center address is configured correctly in `microservice.yaml` file
+
+   ```yaml
+   cse:
+     service:
+       registry:
+         address: http://127.0.0.1:30100		#service center address
+   ```
+
+2. Start the auth-provider service
+
+   - Start provider service by maven
+
+     Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `AuthProviderMain`.
+
+     ```bash
+     cd servicecomb-java-chassis/
+     mvn clean install -Psamples -DskipTests			#only need to install at first time.
+     cd samples/auth-sample/auth-provider/
+     mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.auth.provider.AuthProviderMain"
+     ```
+
+   - Start provider service by IDE
+
+     Import the project by InteliJ IDEA or Eclipse, add sample module to pom.xml file in root module `servicecomb-java-chassis/pom.xml`, and add `<module>samples</module>` to `<modules></modules>` block, Then find `main` function `AuthProviderMain` of provider service and `RUN` it like any other Java program.
+
+3. Start the auth-consumer service
+
+   Just like how to start auth-provider service. But the main class of auth-consumer service is `AuthConsumerMain`. 
+
+   ```bash
+   cd samples/auth-sample/auth-consumer/
+   mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.auth.consumer.AuthConsumerMain"
+   ```
+
+4. How to verify
+   On the producer side, the output should contain the following stuffs if the producer starts up successfully:
+   1. *'swagger: 2.0 info: version: 1.0.0 ...'* means the producer generated swagger contracts
+   2. *'rest listen success. address=0.0.0.0:8080'* means the rest endpoint is listening on port 8080
+   3. *'highway listen success. address=0.0.0.0:7070'* means the highway endpoint is listening on port 7070
+   4. *'Register microservice instance success'* means the producer has registered successfully to service center
+   
+   On the consumer side, you can see the following outputs if the consumer can invoke the producer:
+   1. *'Hello Authenticate'* means the consumer calls sayhi with name=Authenticate successfully
+   2. *'Hello person ServiceComb/Authenticate'* means the consumer calls sayhello successfully
\ No newline at end of file
diff --git a/java-chassis-samples/auth-sample/auth-consumer/pom.xml b/java-chassis-samples/auth-sample/auth-consumer/pom.xml
new file mode 100644
index 0000000..d37ea20
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-consumer/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>auth-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>auth-consumer</artifactId>
+  <name>Java Chassis::Samples::Auth::Consumer</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-publickey-auth</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/auth-sample/auth-consumer/src/main/java/org/apache/servicecomb/samples/auth/consumer/AuthConsumerMain.java b/java-chassis-samples/auth-sample/auth-consumer/src/main/java/org/apache/servicecomb/samples/auth/consumer/AuthConsumerMain.java
new file mode 100644
index 0000000..2efa3e8
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-consumer/src/main/java/org/apache/servicecomb/samples/auth/consumer/AuthConsumerMain.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.auth.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+@Component
+public class AuthConsumerMain {
+
+  private static RestTemplate restTemplate = RestTemplateBuilder.create();
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    Person person = new Person();
+    person.setName("ServiceComb/Authenticate");
+    System.out
+        .println("RestTemplate Consumer or POJO Consumer.  You can choose whatever you like.");
+    String sayHiResult = restTemplate
+        .postForObject(
+            "cse://auth-provider/springmvchello/sayhi?name=Authenticate",
+            null,
+            String.class);
+    String sayHelloResult = restTemplate.postForObject(
+        "cse://auth-provider/springmvchello/sayhello",
+        person,
+        String.class);
+    System.out.println(sayHiResult);
+    System.out.println(sayHelloResult);
+  }
+}
diff --git a/java-chassis-samples/auth-sample/auth-consumer/src/main/resources/log4j2.xml b/java-chassis-samples/auth-sample/auth-consumer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..7beef41
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-consumer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/authConsumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/auth-sample/auth-consumer/src/main/resources/microservice.yaml b/java-chassis-samples/auth-sample/auth-consumer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..7b3542f
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-consumer/src/main/resources/microservice.yaml
@@ -0,0 +1,32 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: auth-sample
+service_description:
+  name: authConsumer
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  handler:
+    chain:
+      Consumer:
+        default: auth-consumer, loadbalance
+  references:
+    auth-provider:
+      version-rule: 0.0.1
diff --git a/java-chassis-samples/auth-sample/auth-provider/pom.xml b/java-chassis-samples/auth-sample/auth-provider/pom.xml
new file mode 100644
index 0000000..0262ac5
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-provider/pom.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>auth-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>auth-provider</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-publickey-auth</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/auth-sample/auth-provider/src/main/java/org/apache/servicecomb/samples/auth/provider/AuthProviderMain.java b/java-chassis-samples/auth-sample/auth-provider/src/main/java/org/apache/servicecomb/samples/auth/provider/AuthProviderMain.java
new file mode 100644
index 0000000..1256f64
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-provider/src/main/java/org/apache/servicecomb/samples/auth/provider/AuthProviderMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.auth.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class AuthProviderMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/auth-sample/auth-provider/src/main/java/org/apache/servicecomb/samples/auth/provider/SpringmvcHelloImpl.java b/java-chassis-samples/auth-sample/auth-provider/src/main/java/org/apache/servicecomb/samples/auth/provider/SpringmvcHelloImpl.java
new file mode 100644
index 0000000..42ef65d
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-provider/src/main/java/org/apache/servicecomb/samples/auth/provider/SpringmvcHelloImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.auth.provider;
+
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.servicecomb.provider.rest.common.RestSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@RestSchema(schemaId = "springmvcHello")
+@RequestMapping(path = "/springmvchello", produces = MediaType.APPLICATION_JSON)
+public class SpringmvcHelloImpl implements Hello {
+
+  @Override
+  @RequestMapping(path = "/sayhi", method = RequestMethod.POST)
+  public String sayHi(@RequestParam(name = "name") String name) {
+    return "Hello " + name;
+  }
+
+  @Override
+  @RequestMapping(path = "/sayhello", method = RequestMethod.POST)
+  public String sayHello(@RequestBody Person person) {
+    return "Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/auth-sample/auth-provider/src/main/resources/log4j2.xml b/java-chassis-samples/auth-sample/auth-provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..065e114
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/authProvider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/auth-sample/auth-provider/src/main/resources/microservice.yaml b/java-chassis-samples/auth-sample/auth-provider/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..550a798
--- /dev/null
+++ b/java-chassis-samples/auth-sample/auth-provider/src/main/resources/microservice.yaml
@@ -0,0 +1,33 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: auth-sample
+service_description:
+  name: auth-provider
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  handler:
+    chain:
+      Provider:
+        default: auth-provider
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
diff --git a/java-chassis-samples/auth-sample/pom.xml b/java-chassis-samples/auth-sample/pom.xml
new file mode 100644
index 0000000..38cb25c
--- /dev/null
+++ b/java-chassis-samples/auth-sample/pom.xml
@@ -0,0 +1,33 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>auth-sample</artifactId>
+  <name>Java Chassis::Samples::Auth</name>
+  <packaging>pom</packaging>
+  <modules>
+    <module>auth-provider</module>
+    <module>auth-consumer</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/bmi/README.md b/java-chassis-samples/bmi/README.md
new file mode 100644
index 0000000..10c5a52
--- /dev/null
+++ b/java-chassis-samples/bmi/README.md
@@ -0,0 +1,45 @@
+# Body Mass Index(BMI) Calculator Microservice Demo
+## Architecture of BMI Calculator
+There are two microservices in this demo.
+* Webapp (API Gateway)
+* BMI Calculator (computing service)
+
+## Prerequisite
+1. [Oracle JDK 1.8+](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html)
+2. [Maven 3.x](https://maven.apache.org/install.html)
+3. [Gradle 4.x](https://gradle.org/install/)(Optional)
+
+## Quick Start(Linux)
+1. Run the service center
+
+   [how to start service center](http://servicecomb.apache.org/users/setup-environment/#)
+
+2. Get the bmi demo's code
+```bash
+git clone https://github.com/apache/servicecomb-java-chassis.git
+cd servicecomb-java-chassis/samples
+```
+3. Run microservices
+* via maven
+   * Run the **BMI calculator service**
+      ```bash
+      (cd bmi/calculator; mvn spring-boot:run)
+      ```
+   * Run the **webapp service**
+      ```bash
+      (cd bmi/webapp; mvn spring-boot:run)
+      ```
+* via gradle
+   * Install ServiceComb Java Chassis
+      ```bash
+      mvn clean install -DskipTests
+      ```
+   * Run the **BMI calculator service**
+      ```bash
+      (cd bmi/calculator; gradle bootRun)
+      ```
+   * Run the **webapp service**
+      ```bash
+      (cd bmi/webapp; gradle bootRun)
+      ```
+4. Visit the services via **<a>http://127.0.0.1:8889</a>**.
diff --git a/java-chassis-samples/bmi/build.gradle b/java-chassis-samples/bmi/build.gradle
new file mode 100644
index 0000000..3b73658
--- /dev/null
+++ b/java-chassis-samples/bmi/build.gradle
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+allprojects  {
+    apply plugin: 'maven'
+
+    group = 'org.apache.servicecomb.samples'
+    version = '1.0.0-SNAPSHOT'
+}
+
+buildscript {
+    dependencies {
+        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.12.RELEASE")
+    }
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+}
+
+subprojects {
+    apply plugin: 'java'
+    apply plugin: 'org.springframework.boot'
+
+    sourceCompatibility = 1.8
+    targetCompatibility = 1.8
+
+    tasks.withType(JavaCompile) {
+        options.encoding = 'UTF-8'
+    }
+
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+
+    dependencies {
+        compile group: 'org.hibernate', name: 'hibernate-validator', version:'5.2.4.Final'
+    }
+}
diff --git a/java-chassis-samples/bmi/calculator/build.gradle b/java-chassis-samples/bmi/calculator/build.gradle
new file mode 100644
index 0000000..71c0019
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/build.gradle
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+description = 'Java Chassis::Samples::BMI::Calculator'
+
+dependencies {
+    compile(group: 'org.springframework.boot', name: 'spring-boot-starter') {
+        exclude(module: 'commons-logging')
+    }
+    compile group: 'org.apache.servicecomb', name: 'spring-boot-starter-provider'
+    compile group: 'org.apache.servicecomb', name: 'handler-flowcontrol-qps'
+    compile group: 'org.apache.servicecomb', name: 'handler-bizkeeper'
+    compile group: 'org.apache.servicecomb', name: 'handler-tracing-zipkin'
+}
+
+// dependency-management-plugin is a replacement of dependencyManagement in maven
+// we need to enable the plugin and specify the dependencyManagement in the following form in each submodule
+// according to the official document: https://github.com/spring-gradle-plugins/dependency-management-plugin.
+buildscript {
+    dependencies {
+        classpath('io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE')
+    }
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+}
+
+apply plugin: 'io.spring.dependency-management'
+
+dependencyManagement {
+    imports {
+        mavenBom 'org.apache.servicecomb:java-chassis-dependencies:1.0.0-SNAPSHOT'
+    }
+}
diff --git a/java-chassis-samples/bmi/calculator/pom.xml b/java-chassis-samples/bmi/calculator/pom.xml
new file mode 100644
index 0000000..04821f9
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>bmi</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>bmi-calculator</artifactId>
+  <name>Java Chassis::Samples::BMI::Calculator</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>spring-boot-starter-provider</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-tracing-zipkin</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/BMIViewObject.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/BMIViewObject.java
new file mode 100644
index 0000000..54f00ec
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/BMIViewObject.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class BMIViewObject {
+
+  private double result;
+
+  private String instanceId;
+
+  private String callTime;
+
+  public BMIViewObject(double result, String instanceId, Date now) {
+    this.result = result;
+    this.instanceId = instanceId;
+    this.callTime = new SimpleDateFormat("HH:mm:ss").format(now);
+  }
+
+  public double getResult() {
+    return result;
+  }
+
+  public void setResult(double result) {
+    this.result = result;
+  }
+
+  public String getInstanceId() {
+    return instanceId;
+  }
+
+  public void setInstanceId(String instanceId) {
+    this.instanceId = instanceId;
+  }
+
+  public String getCallTime() {
+    return callTime;
+  }
+
+  public void setCallTime(String callTime) {
+    this.callTime = callTime;
+  }
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorApplication.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorApplication.java
new file mode 100644
index 0000000..0d4b3ae
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorApplication.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableServiceComb
+public class CalculatorApplication {
+
+  public static void main(String[] args) {
+    SpringApplication.run(CalculatorApplication.class, args);
+  }
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorEndpoint.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorEndpoint.java
new file mode 100644
index 0000000..8be9b40
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorEndpoint.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+/**
+ * {@link CalculatorEndpoint} provides the common interface for different endpoint implementations.
+ * It needs to be declared as public.
+ */
+public interface CalculatorEndpoint {
+  /**
+   * Calculate the BMI(Body Mass Index).
+   */
+  BMIViewObject calculate(double height, double weight);
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorRestEndpoint.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorRestEndpoint.java
new file mode 100644
index 0000000..a3db932
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorRestEndpoint.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+import java.util.Date;
+
+import org.apache.servicecomb.provider.rest.common.RestSchema;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * {@link CalculatorRestEndpoint} provides the rest implementation of {@link CalculatorEndpoint}.
+ * The rest endpoint is accessed by /bmi?height={value}&width={value} with HTTP GET.
+ */
+@RestSchema(schemaId = "calculatorRestEndpoint")
+@RequestMapping(path = "/")
+public class CalculatorRestEndpoint implements CalculatorEndpoint {
+
+  private final CalculatorService calculatorService;
+
+  private final InstanceInfoService instanceInfoService;
+
+  @Autowired
+  public CalculatorRestEndpoint(CalculatorService calculatorService, InstanceInfoService instanceInfoService) {
+    this.calculatorService = calculatorService;
+    this.instanceInfoService = instanceInfoService;
+  }
+
+  @GetMapping(path = "/bmi")
+  @Override
+  public BMIViewObject calculate(double height, double weight) {
+
+    String instanceId = instanceInfoService.getInstanceId();
+    double bmiResult = calculatorService.calculate(height, weight);
+    return new BMIViewObject(bmiResult, instanceId, new Date());
+  }
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorService.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorService.java
new file mode 100644
index 0000000..4d0fc8d
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+/**
+ * {@link CalculatorService} provides interface of actual BMI calculation.
+ */
+public interface CalculatorService {
+
+  /**
+   * @see CalculatorEndpoint#calculate(double, double)
+   */
+  double calculate(double height, double weight);
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorServiceImpl.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorServiceImpl.java
new file mode 100644
index 0000000..1d70a18
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/CalculatorServiceImpl.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+
+import org.springframework.stereotype.Service;
+
+@Service
+public class CalculatorServiceImpl implements CalculatorService {
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public double calculate(double height, double weight) {
+    if (height <= 0 || weight <= 0) {
+      throw new IllegalArgumentException("Arguments must be above 0");
+    }
+    double heightInMeter = height / 100;
+    double bmi = weight / (heightInMeter * heightInMeter);
+    return roundToOnePrecision(bmi);
+  }
+
+  private double roundToOnePrecision(double value) {
+    return BigDecimal.valueOf(value).setScale(1, RoundingMode.HALF_UP).doubleValue();
+  }
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/InstanceInfoService.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/InstanceInfoService.java
new file mode 100644
index 0000000..d6fad32
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/InstanceInfoService.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+/**
+ * {@link InstanceInfoService} provides interface of instance information.
+ */
+public interface InstanceInfoService {
+
+  String getInstanceId();
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/InstanceInfoServiceImpl.java b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/InstanceInfoServiceImpl.java
new file mode 100644
index 0000000..f3ae184
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/java/org/apache/servicecomb/samples/bmi/InstanceInfoServiceImpl.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance;
+import org.springframework.stereotype.Service;
+
+@Service
+public class InstanceInfoServiceImpl implements InstanceInfoService {
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public String getInstanceId() {
+
+    MicroserviceInstance instance = RegistryUtils.getMicroserviceInstance();
+    if (instance == null) {
+      throw new IllegalStateException(
+          "unable to find any service instances, maybe there is problem registering in service center?");
+    }
+    return instance.getInstanceId();
+  }
+}
diff --git a/java-chassis-samples/bmi/calculator/src/main/resources/microservice.yaml b/java-chassis-samples/bmi/calculator/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..43da602
--- /dev/null
+++ b/java-chassis-samples/bmi/calculator/src/main/resources/microservice.yaml
@@ -0,0 +1,34 @@
+#
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+# all interconnected microservices must belong to an application wth the same ID
+APPLICATION_ID: bmi
+service_description:
+# name of the declaring microservice
+  name: calculator
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:7777
+  handler:
+    chain:
+      Provider:
+        default: bizkeeper-provider
\ No newline at end of file
diff --git a/java-chassis-samples/bmi/pom.xml b/java-chassis-samples/bmi/pom.xml
new file mode 100644
index 0000000..97abb94
--- /dev/null
+++ b/java-chassis-samples/bmi/pom.xml
@@ -0,0 +1,95 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>org.apache.servicecomb.samples</groupId>
+  <artifactId>bmi</artifactId>
+  <name>Java Chassis::Samples::BMI</name>
+  <version>2.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>calculator</module>
+    <module>webapp</module>
+  </modules>
+
+  <description>Quick Start Demo for Using ServiceComb Java Chassis</description>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    <java.version>1.8</java.version>
+    <java-chassis.version>${project.version}</java-chassis.version>
+    <spring-boot-1.version>1.5.14.RELEASE</spring-boot-1.version>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>java-chassis-dependencies</artifactId>
+        <version>${java-chassis.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-dependencies</artifactId>
+        <version>${spring-boot-1.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.hibernate.validator</groupId>
+      <artifactId>hibernate-validator</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.validation</groupId>
+      <artifactId>validation-api</artifactId>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <version>0.13</version>
+        <configuration>
+          <excludes>
+            <exclude>.travis.yml</exclude>
+            <exclude>**/*.md</exclude>
+            <exclude>**/target/*</exclude>
+            <!-- Skip the ssl configuration files -->
+            <exculde>**/resources/ssl/**</exculde>
+            <!-- Skip the protobuf files -->
+            <exclude>**/*.proto</exclude>
+            <!-- Skip the idl files -->
+            <exclude>**/*.idl</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/java-chassis-samples/bmi/settings.gradle b/java-chassis-samples/bmi/settings.gradle
new file mode 100644
index 0000000..308a503
--- /dev/null
+++ b/java-chassis-samples/bmi/settings.gradle
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'bmi'
+include ':bmi-calculator'
+include ':webapp'
+
+project(':bmi-calculator').projectDir = "$rootDir/calculator" as File
+project(':webapp').projectDir = "$rootDir/webapp" as File
\ No newline at end of file
diff --git a/java-chassis-samples/bmi/webapp/build.gradle b/java-chassis-samples/bmi/webapp/build.gradle
new file mode 100644
index 0000000..1624d9c
--- /dev/null
+++ b/java-chassis-samples/bmi/webapp/build.gradle
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+description = 'Java Chassis::Samples::BMI::Webapp'
+
+dependencies {
+    compile(group: 'org.springframework.boot', name: 'spring-boot-starter') {
+        exclude(module: 'commons-logging')
+    }
+    compile group: 'org.apache.servicecomb', name: 'spring-boot-starter-servicecomb'
+    compile group: 'org.apache.servicecomb', name: 'spring-boot-starter-discovery'
+    compile group: 'org.apache.servicecomb', name: 'spring-cloud-zuul'
+    compile group: 'org.apache.servicecomb', name: 'spring-cloud-zuul-zipkin'
+}
+
+// dependency-management-plugin is a replacement of dependencyManagement in maven
+// we need to enable the plugin and specify the dependencyManagement in the following form in each submodule
+// according to the official document: https://github.com/spring-gradle-plugins/dependency-management-plugin.
+buildscript {
+    dependencies {
+        classpath('io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE')
+    }
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+}
+
+apply plugin: 'io.spring.dependency-management'
+
+dependencyManagement {
+    imports {
+        mavenBom 'org.apache.servicecomb:java-chassis-dependencies:1.0.0-SNAPSHOT'
+    }
+}
diff --git a/java-chassis-samples/bmi/webapp/pom.xml b/java-chassis-samples/bmi/webapp/pom.xml
new file mode 100644
index 0000000..c287a94
--- /dev/null
+++ b/java-chassis-samples/bmi/webapp/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>bmi</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>webapp</artifactId>
+  <name>Java Chassis::Samples::BMI::Webapp</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter</artifactId>
+    </dependency>
+    <!--add rest transport-->
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>spring-boot-starter-servicecomb</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>spring-boot-starter-discovery</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>spring-cloud-zuul</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>spring-cloud-zuul-zipkin</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/java-chassis-samples/bmi/webapp/src/main/java/org/apache/servicecomb/samples/bmi/GatewayApplication.java b/java-chassis-samples/bmi/webapp/src/main/java/org/apache/servicecomb/samples/bmi/GatewayApplication.java
new file mode 100644
index 0000000..5f8be1e
--- /dev/null
+++ b/java-chassis-samples/bmi/webapp/src/main/java/org/apache/servicecomb/samples/bmi/GatewayApplication.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.bmi;
+
+import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
+
+@SpringBootApplication
+@EnableZuulProxy
+@EnableServiceComb
+public class GatewayApplication {
+  public static void main(String[] args) {
+    SpringApplication.run(GatewayApplication.class, args);
+  }
+}
diff --git a/java-chassis-samples/bmi/webapp/src/main/resources/application.yaml b/java-chassis-samples/bmi/webapp/src/main/resources/application.yaml
new file mode 100644
index 0000000..0c901dc
--- /dev/null
+++ b/java-chassis-samples/bmi/webapp/src/main/resources/application.yaml
@@ -0,0 +1,32 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+zuul:
+  routes:
+    calculator: /calculator/**
+
+# disable netflix eurkea since it's not used for service discovery
+ribbon:
+  eureka:
+    enabled: false
+
+server:
+  port: 8889
+
+servicecomb:
+  tracing:
+    enabled: false
diff --git a/java-chassis-samples/bmi/webapp/src/main/resources/microservice.yaml b/java-chassis-samples/bmi/webapp/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..5f8d524
--- /dev/null
+++ b/java-chassis-samples/bmi/webapp/src/main/resources/microservice.yaml
@@ -0,0 +1,29 @@
+#
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+# all interconnected microservices must belong to an application wth the same ID
+APPLICATION_ID: bmi
+service_description:
+# name of the declaring microservice
+  name: gateway
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+
diff --git a/java-chassis-samples/bmi/webapp/src/main/resources/static/index.html b/java-chassis-samples/bmi/webapp/src/main/resources/static/index.html
new file mode 100644
index 0000000..faabdf7
--- /dev/null
+++ b/java-chassis-samples/bmi/webapp/src/main/resources/static/index.html
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<html>
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
+    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
+    <script src="https://code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
+    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
+  </head>
+  <body>
+    <div class="container">
+
+      <div class="col-md-1"></div>
+      <div class="col-md-10">
+        <h2 align="center">BMI Calculator</h2>
+
+        <div class="form-group">
+          <label for="height" class="col-form-label"><b>Height(cm):</b></label>
+          <input type="number" class="form-control" id="height" name="height" placeholder="Please input your height">
+        </div>
+        <div class="form-group">
+            <label for="weight" class="col-form-label"><b>Weight(kg):</b></label>
+            <input type="number" class="form-control" id="weight" name="weight" placeholder="Please input your weight">
+        </div>
+        <button type="submit" class="btn btn-primary" id="submit">Submit</button>
+
+        <br/>
+        <div class="alert alert-light" role="alert" id="bmi">
+          <h3>BMI Result: <span id="bmi_result"></span></h3>
+          <h3>BMI Instance ID: <span id="bmi_instanceId"></span></h3>
+          <h3>BMI Called Time: <span id="bmi_callTime"></span></h3>
+        </div>
+        <div class="alert alert-secondary" role="alert">
+          <b>Note: </b>Range of healthy weight is between <b>18.5</b> and <b>24.9</b>.
+        </div>
+        <div id="error" class="alert alert-danger" role="alert"><p id="error_message"></p></div>
+      </div>
+    </div>
+
+  </body>
+  <script>
+      $("#error").hide();
+      $("#submit").click(function () {
+        if ( !$("#height").val() || !$("#weight").val() ) {
+          alert("Please input both the height and weight");
+          return;
+        }
+        $.ajax({
+          url: "/calculator/bmi?height=" + $("#height").val() + "&weight=" + $("#weight").val(),
+          type: "GET",
+          success: function (data) {
+            $("#error").hide();
+            $("#bmi_result").text(data.result);
+            $("#bmi_instanceId").text(data.instanceId);
+            $("#bmi_callTime").text(data.callTime);
+            if ( data.result < 18.5 || (data.result < 30 && data.result >= 25) ) {
+              $("#bmi").removeClass().addClass("alert").addClass("alert-warning");
+            } else if ( data.result < 25 && data.result >= 18.5 ) {
+              $("#bmi").removeClass().addClass("alert").addClass("alert-success");
+            } else {
+              $("#bmi").removeClass().addClass("alert").addClass("alert-danger");
+            }
+          },
+          error: function (xhr) {
+            $("#bmi").removeClass().addClass("alert").addClass("alert-light");
+            $("#bmi_result").text('');
+            if (xhr.responseText.length == 0) {
+              $("#error_message").text("empty fallback called");
+              $("#error").removeClass().addClass("alert").addClass("alert-success").show();
+              return;
+            }
+            var resp = JSON.parse(xhr.responseText);
+            if (xhr.status == 429) {
+              $("#error_message").text(resp.message);
+              $("#error").removeClass().addClass("alert").addClass("alert-danger").show();
+            } else {
+              $("#error_message").text(resp.error + ": " + resp.exception)
+              $("#error").removeClass().addClass("alert").addClass("alert-danger").show();
+            }
+          }
+        });
+      });
+    </script>
+
+</html>
diff --git a/java-chassis-samples/codefirst-sample/README.md b/java-chassis-samples/codefirst-sample/README.md
new file mode 100644
index 0000000..e3f8e03
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/README.md
@@ -0,0 +1,86 @@
+## Code First Sample
+
+ServiceComb Java Chassis supports generating provider-service API implicitly. When the service is started, an API is automatically generated and registered to the service center.
+
+When you develop a microservice in transparent RPC mode, the code does not show how you want to define an API, and all generated APIs are POST methods, The input parameters of all the methods will be packaged as a class and transferred as body parameters. Therefore, if you develop providers using implicit APIs, you are advised to choose Spring MVC or JAX-RS mode to obtain complete RESTful statements.
+
+For detail information please refer to [Doc](http://servicecomb.apache.org/users/service-contract/)
+
+
+
+## Sample Quick Start
+
+1. Start the ServiceComb/Service Center
+
+   - [how to start the service center](http://servicecomb.apache.org/users/setup-environment/#)
+   - make sure service center address is configured correctly in `microservice.yaml` file
+
+   ```yaml
+   cse:
+     service:
+       registry:
+         address: http://127.0.0.1:30100		#service center address
+   ```
+
+2. Start the codefirst-provider service
+
+   - Start provider service via maven
+
+      Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `CodeFirstProviderMain`.
+
+      ```bash
+      cd servicecomb-java-chassis/
+      mvn clean install -Psamples -DskipTests			#only need to install at first time.
+      cd samples/codefirst-sample/codefirst-provider/
+      mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.codefirst.provider.CodeFirstProviderMain"
+      ```
+
+   - Start provider service via gradle
+
+      Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `CodeFirstProviderMain`.
+
+      ```bash
+      cd servicecomb-java-chassis/
+      mvn clean install -Psamples -DskipTests			#only need to install at first time.
+      cd samples/codefirst-sample/codefirst-provider/
+      gradle clean run
+      ```
+
+   - Start provider service via IDE
+
+      Import the project by InteliJ IDEA or Eclipse, add sample module to pom.xml file in root module `servicecomb-java-chassis/pom.xml`, and add `<module>samples</module>` to `<modules></modules>` block, Then find `main` function `CodeFirstProviderMain` of provider service and `RUN` it like any other Java program.
+
+3. Start the codefirst-consumer service
+
+   ```bash
+   cd samples/codefirst-sample/codefirst-consumer/
+   ```
+
+   - Start consumer service via maven
+
+      Just like how to start codefirst-provider service. But the main class of codefirst-consumer service is `CodeFirstConsumerMain`.
+
+      ```bash
+      mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.codefirst.consumer.CodeFirstConsumerMain"
+      ```
+
+   - Start consumer service via gradle
+
+      ```bash
+      gradle clean run
+      ```
+
+4. How to verify
+   On the producer side, the output should contain the following stuffs if the producer starts up successfully:
+   1. *'swagger: 2.0 info: version: 1.0.0 ...'* means the producer generated swagger contracts
+   2. *'rest listen success. address=0.0.0.0:8080'* means the rest endpoint is listening on port 8080
+   3. *'highway listen success. address=0.0.0.0:7070'* means the highway endpoint is listening on port 7070
+   4. *'Register microservice instance success'* means the producer has registered successfully to service center
+   
+   On the consumer side, you can see the following outputs if the consumer can invoke the producer:
+   1. *'Pojo Hello Java Chassis'* means the consumer calls sayhi successfully 
+   2. *'Jaxrs Hello Java Chassis'* means the consumer calls Jaxrs sayhi successfully
+   3. *'Spring mvc Hello Java Chassis'* means the consumer calls SpringMvc sayhi successfully
+   4. *'Pojo Hello person ServiceComb/Java Chassis'* means the consumer calls sayhello successfully
+   5. *'Jaxrs Hello person ServiceComb/Java Chassis'* means the consumer calls Jaxrs sayhello successfully
+   6. *'Spring mvc Hello person ServiceComb/Java Chassis'* means the consumer calls SpringMvc sayhello successfully
\ No newline at end of file
diff --git a/java-chassis-samples/codefirst-sample/build.gradle b/java-chassis-samples/codefirst-sample/build.gradle
new file mode 100644
index 0000000..67a7af5
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/build.gradle
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+allprojects  {
+    apply plugin: 'maven'
+
+    group = 'org.apache.servicecomb.samples'
+    version = '1.0.0-SNAPSHOT'
+}
+
+subprojects {
+    apply plugin: 'java'
+
+    sourceCompatibility = 1.8
+    targetCompatibility = 1.8
+
+    tasks.withType(JavaCompile) {
+        options.encoding = 'UTF-8'
+    }
+
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+}
\ No newline at end of file
diff --git a/java-chassis-samples/codefirst-sample/codefirst-consumer/build.gradle b/java-chassis-samples/codefirst-sample/codefirst-consumer/build.gradle
new file mode 100644
index 0000000..90d4ddc
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-consumer/build.gradle
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+description = 'Java Chassis::Samples::CodeFirst::Consumer'
+
+dependencies {
+    compile group: 'org.apache.servicecomb', name: 'provider-pojo'
+    compile group: 'org.apache.servicecomb', name: 'transport-highway'
+    compile group: 'org.apache.servicecomb', name: 'transport-rest-vertx'
+    compile group: 'org.apache.servicecomb.samples', name: 'common-schema', version: '1.0.0-SNAPSHOT'
+    compile group: 'org.slf4j', name: 'slf4j-log4j12'
+}
+
+apply plugin: 'application'
+
+mainClassName = 'org.apache.servicecomb.samples.codefirst.consumer.CodeFirstConsumerMain'
+
+// dependency-management-plugin is a replacement of dependencyManagement in maven
+// we need to enable the plugin and specify the dependencyManagement in the following form in each submodule
+// according to the official document: https://github.com/spring-gradle-plugins/dependency-management-plugin.
+buildscript {
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+    dependencies {
+        classpath('io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE')
+    }
+}
+
+apply plugin: 'io.spring.dependency-management'
+
+dependencyManagement {
+    imports {
+        mavenBom 'org.apache.servicecomb:java-chassis-dependencies:1.0.0-SNAPSHOT'
+    }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-consumer/pom.xml b/java-chassis-samples/codefirst-sample/codefirst-consumer/pom.xml
new file mode 100644
index 0000000..a4a3628
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-consumer/pom.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>codefirst-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>codefirst-consumer</artifactId>
+  <name>Java Chassis::Samples::CodeFirst::Consumer</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/java/org/apache/servicecomb/samples/codefirst/consumer/CodeFirstConsumerMain.java b/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/java/org/apache/servicecomb/samples/codefirst/consumer/CodeFirstConsumerMain.java
new file mode 100644
index 0000000..8866e8e
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/java/org/apache/servicecomb/samples/codefirst/consumer/CodeFirstConsumerMain.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.codefirst.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CodeFirstConsumerMain {
+
+  @RpcReference(microserviceName = "codefirst", schemaId = "codeFirstJaxrsHello")
+  private static Hello jaxrsHello;
+
+  @RpcReference(microserviceName = "codefirst", schemaId = "codeFirstSpringmvcHello")
+  private static Hello springmvcHello;
+
+  @RpcReference(microserviceName = "codefirst", schemaId = "codeFirstHello")
+  private static Hello hello;
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    System.out.println(hello.sayHi("Java Chassis"));
+    System.out.println(jaxrsHello.sayHi("Java Chassis"));
+    System.out.println(springmvcHello.sayHi("Java Chassis"));
+    Person person = new Person();
+    person.setName("ServiceComb/Java Chassis");
+    System.out.println(hello.sayHello(person));
+    System.out.println(jaxrsHello.sayHello(person));
+    System.out.println(springmvcHello.sayHello(person));
+  }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/resources/log4j2.xml b/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..1d58711
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/consumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/resources/microservice.yaml b/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..ae72312
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-consumer/src/main/resources/microservice.yaml
@@ -0,0 +1,31 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: codefirsttest
+service_description:
+  name: codefirstClient
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  isolation:
+    Consumer:
+      enabled: false
+  references:
+    codefirst:
+      version-rule: 0.0.1
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/build.gradle b/java-chassis-samples/codefirst-sample/codefirst-provider/build.gradle
new file mode 100644
index 0000000..9c85d07
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/build.gradle
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+description = 'Java Chassis::Samples::CodeFirst::Provider'
+
+dependencies {
+    compile group: 'org.apache.servicecomb', name: 'provider-pojo'
+    compile group: 'org.apache.servicecomb', name: 'provider-springmvc'
+    compile group: 'org.apache.servicecomb', name: 'transport-highway'
+    compile group: 'org.apache.servicecomb', name: 'transport-rest-vertx'
+    compile group: 'org.apache.servicecomb.samples', name: 'common-schema', version: '1.0.0-SNAPSHOT'
+    compile group: 'org.slf4j', name: 'slf4j-log4j12'
+}
+
+apply plugin: 'application'
+
+mainClassName = 'org.apache.servicecomb.samples.codefirst.provider.CodeFirstProviderMain'
+
+// dependency-management-plugin is a replacement of dependencyManagement in maven
+// we need to enable the plugin and specify the dependencyManagement in the following form in each submodule
+// according to the official document: https://github.com/spring-gradle-plugins/dependency-management-plugin.
+buildscript {
+    repositories {
+        mavenLocal()
+        mavenCentral()
+    }
+    dependencies {
+        classpath('io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE')
+    }
+}
+
+apply plugin: 'io.spring.dependency-management'
+
+dependencyManagement {
+    imports {
+        mavenBom 'org.apache.servicecomb:java-chassis-dependencies:1.0.0-SNAPSHOT'
+    }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/pom.xml b/java-chassis-samples/codefirst-sample/codefirst-provider/pom.xml
new file mode 100644
index 0000000..69036ec
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>codefirst-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>codefirst-provider</artifactId>
+  <name>Java Chassis::Samples::CodeFirst::Provider</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstJaxrsHelloImpl.java b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstJaxrsHelloImpl.java
new file mode 100644
index 0000000..d79497f
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstJaxrsHelloImpl.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.codefirst.provider;
+
+
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+
+@RpcSchema(schemaId = "codeFirstJaxrsHello")
+@Path("/codefirstjaxrshello")
+@Produces(MediaType.APPLICATION_JSON)
+public class CodeFirstJaxrsHelloImpl implements Hello {
+
+  @Path("/sayhi")
+  @POST
+  @Override
+  public String sayHi(String name) {
+    return "Jaxrs Hello " + name;
+  }
+
+  @Path("/sayhello")
+  @POST
+  @Override
+  public String sayHello(Person person) {
+    return "Jaxrs Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstPojoHelloImpl.java b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstPojoHelloImpl.java
new file mode 100644
index 0000000..85f3582
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstPojoHelloImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.codefirst.provider;
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+
+@RpcSchema(schemaId = "codeFirstHello")
+public class CodeFirstPojoHelloImpl implements Hello {
+
+  @Override
+  public String sayHi(String name) {
+    return "Pojo Hello " + name;
+  }
+
+  @Override
+  public String sayHello(Person person) {
+    return "Pojo Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstProviderMain.java b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstProviderMain.java
new file mode 100644
index 0000000..8333d8e
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstProviderMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.codefirst.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class CodeFirstProviderMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstSpringmvcHelloImpl.java b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstSpringmvcHelloImpl.java
new file mode 100644
index 0000000..8d0370b
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/java/org/apache/servicecomb/samples/codefirst/provider/CodeFirstSpringmvcHelloImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.codefirst.provider;
+
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@RpcSchema(schemaId = "codeFirstSpringmvcHello")
+@RequestMapping(path = "/springmvchello", produces = MediaType.APPLICATION_JSON)
+public class CodeFirstSpringmvcHelloImpl implements Hello {
+
+  @Override
+  @RequestMapping(path = "/sayhi", method = RequestMethod.POST)
+  public String sayHi(@RequestParam(name = "name") String name) {
+    return "Spring mvc Hello " + name;
+  }
+
+  @Override
+  @RequestMapping(path = "/sayhello", method = RequestMethod.POST)
+  public String sayHello(@RequestBody Person person) {
+    return "Spring mvc Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/resources/log4j2.xml b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9302302
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/provider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/resources/microservice.yaml b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..c775233
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/codefirst-provider/src/main/resources/microservice.yaml
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: codefirsttest
+service_description:
+  name: codefirst
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
diff --git a/java-chassis-samples/codefirst-sample/pom.xml b/java-chassis-samples/codefirst-sample/pom.xml
new file mode 100644
index 0000000..c2d1cc8
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>codefirst-sample</artifactId>
+  <name>Java Chassis::Samples::CodeFirst</name>
+  <packaging>pom</packaging>
+  <properties>
+    <project.build.sourceEncoding>
+      UTF-8
+    </project.build.sourceEncoding>
+  </properties>
+  <modules>
+    <module>codefirst-provider</module>
+    <module>codefirst-consumer</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/codefirst-sample/settings.gradle b/java-chassis-samples/codefirst-sample/settings.gradle
new file mode 100644
index 0000000..c32b5bb
--- /dev/null
+++ b/java-chassis-samples/codefirst-sample/settings.gradle
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+rootProject.name = 'codefirst-sample'
+include ':codefirst-provider'
+include ':codefirst-consumer'
+
+project(':codefirst-provider').projectDir = "$rootDir/codefirst-provider" as File
+project(':codefirst-consumer').projectDir = "$rootDir/codefirst-consumer" as File
\ No newline at end of file
diff --git a/java-chassis-samples/common-schema/pom.xml b/java-chassis-samples/common-schema/pom.xml
new file mode 100644
index 0000000..8604f39
--- /dev/null
+++ b/java-chassis-samples/common-schema/pom.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>common-schema</artifactId>
+  <name>Java Chassis::Samples::Common Schema</name>
+</project>
diff --git a/java-chassis-samples/common-schema/src/main/java/org/apache/servicecomb/samples/common/schema/Hello.java b/java-chassis-samples/common-schema/src/main/java/org/apache/servicecomb/samples/common/schema/Hello.java
new file mode 100644
index 0000000..6fcd139
--- /dev/null
+++ b/java-chassis-samples/common-schema/src/main/java/org/apache/servicecomb/samples/common/schema/Hello.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.common.schema;
+
+
+import org.apache.servicecomb.samples.common.schema.models.Person;
+
+public interface Hello {
+
+  String sayHi(String name);
+
+  String sayHello(Person person);
+}
diff --git a/java-chassis-samples/common-schema/src/main/java/org/apache/servicecomb/samples/common/schema/models/Person.java b/java-chassis-samples/common-schema/src/main/java/org/apache/servicecomb/samples/common/schema/models/Person.java
new file mode 100644
index 0000000..96ba322
--- /dev/null
+++ b/java-chassis-samples/common-schema/src/main/java/org/apache/servicecomb/samples/common/schema/models/Person.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.common.schema.models;
+
+public class Person {
+
+  private String name;
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+}
diff --git a/java-chassis-samples/config-apollo-sample/README.md b/java-chassis-samples/config-apollo-sample/README.md
new file mode 100644
index 0000000..aea5064
--- /dev/null
+++ b/java-chassis-samples/config-apollo-sample/README.md
@@ -0,0 +1,57 @@
+## Use Apollo as Configuration Center
+
+To use Apollo as configuration source in ServiceComb Java Chassis services:
+
+* Start Apollo service and create a project to associate with Chassis service, then generate a token
+
+  [How to use Apollo configuration center](http://servicecomb.apache.org/cn/users/dynamic-config/)
+
+
+* Import `config-apollo` in pom:
+
+  ```xml
+  <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>config-apollo</artifactId>
+   </dependency>
+  ```
+
+* Configurations for Apollo itself in `microservice.yaml`, for example:
+
+  ```yaml
+  apollo:
+    config:
+      serverUri: http://127.0.0.1:8070	#Apollo portal server address
+      serviceName: apollo-test		#service name use AppId in apollo
+      env: DEV				#default value DEV
+      clusters: default		#default value default
+      namespace: application		#default value application
+      token: 				#get token from Apollo web pages
+  ```
+
+* Start Chassis service and update configurations in Apollo portal service.
+
+  [Need to start service center first](http://servicecomb.apache.org/users/setup-environment/#)
+
+  Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `MainServer`.
+
+  ```bash
+  cd servicecomb-java-chassis/
+  mvn clean install -Psamples -DskipTests			#only need to install at first time.
+  cd samples/config-apollo-sample/
+  mvn exec:java -Dexec.mainClass="MainServer"
+  ```
+
+* Verify configurations can be configured dynamically.
+
+  Before publishing a new configuration items from apollo portal, `MainServer` will just print `DynamicProperty: {name=timeout, current value=default}` 
+
+  After `timeout` configuration is published with value `100`, `MainServer` will print `DynamicProperty: {name=timeout, current value=100}` 
+
+
+## More
+
+[Apollo Doc](https://github.com/ctripcorp/apollo/wiki)
+
+[Use Apollo In ServiceComb](http://servicecomb.apache.org/cn/users/dynamic-config/)
+
diff --git a/java-chassis-samples/config-apollo-sample/pom.xml b/java-chassis-samples/config-apollo-sample/pom.xml
new file mode 100644
index 0000000..72af1ec
--- /dev/null
+++ b/java-chassis-samples/config-apollo-sample/pom.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>samples</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>config-apollo-sample</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.netflix.archaius</groupId>
+      <artifactId>archaius-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>config-apollo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+  </dependencies>
+
+
+</project>
\ No newline at end of file
diff --git a/java-chassis-samples/config-apollo-sample/src/main/java/org/apache/servicecomb/samples/apollo/MainServer.java b/java-chassis-samples/config-apollo-sample/src/main/java/org/apache/servicecomb/samples/apollo/MainServer.java
new file mode 100644
index 0000000..3b94f4a
--- /dev/null
+++ b/java-chassis-samples/config-apollo-sample/src/main/java/org/apache/servicecomb/samples/apollo/MainServer.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.apollo;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+import com.netflix.config.DynamicPropertyFactory;
+
+public class MainServer {
+  public static void main(String[] args) throws Exception {
+    BeanUtils.init();
+    while (true) {
+      System.out.println(DynamicPropertyFactory.getInstance().getStringProperty("timeout", "default"));
+      Thread.sleep(3000);
+    }
+  }
+}
diff --git a/java-chassis-samples/config-apollo-sample/src/main/resources/log4j2.xml b/java-chassis-samples/config-apollo-sample/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..7be2ca1
--- /dev/null
+++ b/java-chassis-samples/config-apollo-sample/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/sampleApollo-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/config-apollo-sample/src/main/resources/microservice.yaml b/java-chassis-samples/config-apollo-sample/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..d94cae8
--- /dev/null
+++ b/java-chassis-samples/config-apollo-sample/src/main/resources/microservice.yaml
@@ -0,0 +1,52 @@
+#
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: apollotest
+service_description:
+  name: apollo-test
+  version: 1.0.1
+
+apollo:
+  config:
+    serverUri: http://127.0.0.1:8070
+    serviceName: apollo-test  #AppId in apollo
+    env: DEV
+    #default clusters name in apollo,if user create new clusters please replace this setting value
+    #more detail can be found at https://github.com/ctripcorp/apollo/wiki
+    clusters: default
+    #default namespace name in apollo,if user create new namespace please replace this setting value
+    #more detail can be found at https://github.com/ctripcorp/apollo/wiki/Apollo%E6%A0%B8%E5%BF%83%E6%A6%82%E5%BF%B5%E4%B9%8B%E2%80%9CNamespace%E2%80%9D
+    namespace: application
+    token: #get token from Apollo web pages
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
+  handler:
+    chain:
+      Provider:
+        default: bizkeeper-provider
+  #executors:
+    #default: test
+    #Provider:
+      #server: test
+      #server.wrapParam: test
\ No newline at end of file
diff --git a/java-chassis-samples/custom-handler-sample/README.md b/java-chassis-samples/custom-handler-sample/README.md
new file mode 100644
index 0000000..a8599eb
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/README.md
@@ -0,0 +1,91 @@
+## Customized Handler Sample
+
+ServiceComb support users to define a customized handler and and invoke the handler in handler chain.
+
+* Customize a handler by implement Handler interface, for example:
+
+  ```java
+  public class MyHandler implements Handler {
+    private static final Logger LOGGER = LoggerFactory.getLogger(MyHandler.class);
+    @Override
+    public void handle(Invocation invocation, AsyncResponse asyncResponse) throws Exception {
+      //code before
+      LOGGER.info("It's my handler! \r\n");
+      invocation.next(response -> {
+        // code after
+        asyncResponse.handle(response);
+      });
+    }
+  }
+  ```
+
+* Define handler `id` and `class` in `cse.handler.xml` `config` item under `resources/config` directory
+
+  ```xml
+  <config>
+      <handler id="myhandler" 		     class="org.apache.servicecomb.samples.customerhandler.handlers.MyHandler" />
+  </config>
+
+  ```
+
+* Configure customized `MyHandler` in `microservice.yaml` file along with other handler together
+
+  ```yaml
+  cse:
+    # other configurations omitted
+    handler:
+      chain:
+        Consumer:
+          default: bizkeeper-consumer,loadbalance, myhandler
+  ```
+
+## Sample Quick Start
+
+1. Start the ServiceComb/Service Center
+
+   - [how to start the service center](http://servicecomb.apache.org/users/setup-environment/#)
+   - make sure service center address is configured correctly in `microservice.yaml` file
+
+   ```yaml
+   cse:
+     service:
+       registry:
+         address: http://127.0.0.1:30100		#service center address
+   ```
+
+2. Start the custom-handler-provider service
+
+   - Start provider service by maven
+
+     Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `CustomHandlerProviderMain`.
+
+     ```bash
+     cd servicecomb-java-chassis/			#need to complie code at root directory
+     mvn clean install -Psamples -DskipTests			#only need to install at first time.
+     cd samples/custom-handler-sample/custom-handler-provider/
+     mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.customerhandler.provider.CustomHandlerProviderMain"
+     ```
+
+   - Start provider service by IDE
+
+     Import the project by InteliJ IDEA or Eclipse, add sample module to pom.xml file in root module `servicecomb-java-chassis/pom.xml`, and add `<module>samples</module>` to `<modules></modules>` block, Then find `main` function `CustomHandlerProviderMain` of provider service and `RUN` it like any other Java program.
+
+3. Start the custom-handler-consumer service
+
+   Just like how to start custom-handler-provider service. But the main class of custom-handler-consumer service is `CustomHandlerCustomerMain`. 
+
+   ```bash
+   cd samples/custom-handler-sample/custom-handler-consumer
+   mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.customerhandler.consumer.CustomHandlerCustomerMain"
+   ```
+
+4. How to verify
+   On the producer side, the output should contain the following stuffs if the producer starts up successfully:
+   1. *'swagger: 2.0 info: version: 1.0.0 ...'* means the producer generated swagger contracts
+   2. *'rest listen success. address=0.0.0.0:8080'* means the rest endpoint is listening on port 8080
+   3. *'highway listen success. address=0.0.0.0:7070'* means the highway endpoint is listening on port 7070
+   4. *'Register microservice instance success'* means the producer has registered successfully to service center
+   
+   On the consumer side, you can see the following outputs:
+   1. *'It's my handler!'* means custom handler had take effect
+  
\ No newline at end of file
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-consumer/pom.xml b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/pom.xml
new file mode 100644
index 0000000..f4dcc89
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>custom-handler-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>custom-handler-consumer</artifactId>
+  <name>Java Chassis::Samples::Custom Handler::Consumer</name>
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/java/org/apache/servicecomb/samples/customerhandler/consumer/CustomHandlerCustomerMain.java b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/java/org/apache/servicecomb/samples/customerhandler/consumer/CustomHandlerCustomerMain.java
new file mode 100644
index 0000000..ad6f831
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/java/org/apache/servicecomb/samples/customerhandler/consumer/CustomHandlerCustomerMain.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.customerhandler.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CustomHandlerCustomerMain {
+
+  @RpcReference(microserviceName = "customerhandler", schemaId = "hello")
+  private static Hello hello;
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    System.out.println(hello.sayHi("Java Chassis"));
+    Person person = new Person();
+    person.setName("ServiceComb/Java Chassis");
+    System.out.println(hello.sayHello(person));
+  }
+}
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/java/org/apache/servicecomb/samples/customerhandler/handlers/MyHandler.java b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/java/org/apache/servicecomb/samples/customerhandler/handlers/MyHandler.java
new file mode 100644
index 0000000..da2f89a
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/java/org/apache/servicecomb/samples/customerhandler/handlers/MyHandler.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.customerhandler.handlers;
+
+import org.apache.servicecomb.core.Handler;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.AsyncResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MyHandler implements Handler {
+
+  private static final Logger LOGGER = LoggerFactory.getLogger(MyHandler.class);
+
+  @Override
+  public void handle(Invocation invocation, AsyncResponse asyncResponse) throws Exception {
+    //code before
+
+    LOGGER.info("It's my handler! \r\n");
+
+    invocation.next(response -> {
+      // code after
+      asyncResponse.handle(response);
+    });
+  }
+}
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/config/cse.handler.xml b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/config/cse.handler.xml
new file mode 100644
index 0000000..0cac14f
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/config/cse.handler.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<config>
+  <handler id="myhandler" class="org.apache.servicecomb.samples.customerhandler.handlers.MyHandler"/>
+</config>
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/log4j2.xml b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..1d58711
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/consumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/microservice.yaml b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..fd747ec
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-consumer/src/main/resources/microservice.yaml
@@ -0,0 +1,35 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: chstest
+service_description:
+  name: chsClient
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  handler:
+    chain:
+      Consumer:
+        default: bizkeeper-consumer,loadbalance, myhandler
+  isolation:
+    Consumer:
+      enabled: false
+  references:
+    chs:
+      version-rule: 0.0.1
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-provider/pom.xml b/java-chassis-samples/custom-handler-sample/custom-handler-provider/pom.xml
new file mode 100644
index 0000000..908a285
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-provider/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>custom-handler-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>custom-handler-provider</artifactId>
+  <name>Java Chassis::Samples::Custom Handler::Provider</name>
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/CustomHandlerProviderMain.java b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/CustomHandlerProviderMain.java
new file mode 100644
index 0000000..9caa999
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/CustomHandlerProviderMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.customerhandler.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class CustomHandlerProviderMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/HelloImpl.java b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/HelloImpl.java
new file mode 100644
index 0000000..5b63369
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/java/org/apache/servicecomb/samples/customerhandler/provider/HelloImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.customerhandler.provider;
+
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+
+@RpcSchema(schemaId = "hello")
+public class HelloImpl implements Hello {
+
+  @Override
+  public String sayHi(String name) {
+    return "Hello " + name;
+  }
+
+  @Override
+  public String sayHello(Person person) {
+    return "Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/resources/log4j2.xml b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9302302
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/provider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/resources/microservice.yaml b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..4b473cd
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/custom-handler-provider/src/main/resources/microservice.yaml
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: chstest
+service_description:
+  name: customerhandler
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
diff --git a/java-chassis-samples/custom-handler-sample/pom.xml b/java-chassis-samples/custom-handler-sample/pom.xml
new file mode 100644
index 0000000..0feb0ed
--- /dev/null
+++ b/java-chassis-samples/custom-handler-sample/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>custom-handler-sample</artifactId>
+  <name>Java Chassis::Samples::Custom Handler</name>
+  <packaging>pom</packaging>
+  <modules>
+    <module>custom-handler-consumer</module>
+    <module>custom-handler-provider</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/jaxrs-sample/README.md b/java-chassis-samples/jaxrs-sample/README.md
new file mode 100644
index 0000000..1f24c3d
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/README.md
@@ -0,0 +1,68 @@
+## JAX-RS Sample
+
+ServiceComb supports developers in developing services in JAX-RS mode by using JAX-RS.
+
+### Provider Service
+
+* Define a service API. Compile the Java API definition based on the API definition defined before development
+* Implement the service. JAX-RS is used to describe the development of service code. 
+* Release the service. Add `@RestSchema` as the annotation of the service implementation class and specify schemaID, which indicates that the implementation is released as a schema of the current microservice.
+* Create the jaxrsHello.bean.xml file in the resources/META-INF/spring directory and configure base-package that performs scanning
+
+   [Detail information please refer to Doc](http://servicecomb.apache.org/users/develop-with-jax-rs/)
+
+### Consumer Service
+
+To consume a provider-service, only need to decalare a member of a service API type and add the `RpcReference` annotation for the member, the microservice that depends on the declaration and the `schemaID` just like pojo consumer sample.
+
+### Sample Quick Start
+
+1. Start the ServiceComb/Service Center
+
+   - [how to start the service center](http://servicecomb.apache.org/users/setup-environment/#)
+   - make sure service center address is configured correctly in `microservice.yaml` file
+
+   ```yaml
+   cse:
+     service:
+       registry:
+         address: http://127.0.0.1:30100		#service center address
+   ```
+
+2. Start the jaxrs-provider service
+
+   - Start provider service by maven
+
+     Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `JaxrsProviderMain`.
+
+     ```bash
+     cd servicecomb-java-chassis/
+     mvn clean install -Psamples -DskipTests			#only need to install at first time.
+     cd samples/jaxrs-sample/jaxrs-provider/
+     mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.jaxrs.provider.JaxrsProviderMain"
+     ```
+
+   - Start provider service by IDE
+
+     Import the project by InteliJ IDEA or Eclipse, add sample module to pom.xml file in root module `servicecomb-java-chassis/pom.xml`, and add `<module>samples</module>` to `<modules></modules>` block, Then find `main` function `JaxrsProviderMain` of provider service and `RUN` it like any other Java Program.
+
+3. Start the jaxrs-consumer service
+
+   Just like how to start jaxrs-provider service. But the main class of jaxrs-consumer service is `JaxrsConsumerMain`. 
+
+   ```bash
+   cd samples/jaxrs-sample/jaxrs-consumer/
+   mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.jaxrs.consumer.JaxrsConsumerMain"
+   ```
+
+4. How to verify
+   On the producer side, the output should contain the following stuffs if the producer starts up successfully:
+   1. *'swagger: 2.0 info: version: 1.0.0 ...'* means the producer generated swagger contracts
+   2. *'rest listen success. address=0.0.0.0:8080'* means the rest endpoint is listening on port 8080
+   3. *'highway listen success. address=0.0.0.0:7070'* means the highway endpoint is listening on port 7070
+   4. *'Register microservice instance success'* means the producer has registered successfully to service center
+   
+   On the consumer side, you can see the following outputs if the consumer can invoke the producer:
+   1. *'Hello Java Chassis'* means the consumer calls sayhi by RpcReference successfully
+   2. *'Hello person ServiceComb/Java Chassis'* means the consumer calls sayhello by RpcReference successfully
+   3. *'Bye !'* means the consumer calls saybye by RestTemplate successfully
\ No newline at end of file
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-consumer/pom.xml b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/pom.xml
new file mode 100644
index 0000000..a9cc755
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>jaxrs-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>jaxrs-consumer</artifactId>
+  <name>Java Chassis::Samples::JAXRS::Consumer</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/java/org/apache/servicecomb/samples/jaxrs/consumer/JaxrsConsumerMain.java b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/java/org/apache/servicecomb/samples/jaxrs/consumer/JaxrsConsumerMain.java
new file mode 100644
index 0000000..1934446
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/java/org/apache/servicecomb/samples/jaxrs/consumer/JaxrsConsumerMain.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.jaxrs.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+@Component
+public class JaxrsConsumerMain {
+
+  @RpcReference(microserviceName = "jaxrs", schemaId = "jaxrsHello")
+  private static Hello hello;
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    System.out.println(hello.sayHi("Java Chassis"));
+    Person person = new Person();
+    person.setName("ServiceComb/Java Chassis");
+    System.out.println(hello.sayHello(person));
+
+    RestTemplate restTemplate = RestTemplateBuilder.create();
+    String result = restTemplate.getForObject("cse://jaxrs/jaxrshello/saybye", String.class);
+    System.out.println(result);
+  }
+}
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/log4j2.xml b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..1d58711
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/consumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/microservice.yaml b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..0f0958d
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/microservice.yaml
@@ -0,0 +1,35 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: jaxrstest-sample
+service_description:
+  name: helloClient
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  handler:
+    chain:
+      Consumer:
+        default: bizkeeper-consumer,loadbalance
+  isolation:
+    Consumer:
+      enabled: false
+  references:
+    jaxrs:
+      version-rule: 0.0.1
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/microservices/hello/hello.yaml b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/microservices/hello/hello.yaml
new file mode 100644
index 0000000..fb9328b
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-consumer/src/main/resources/microservices/hello/hello.yaml
@@ -0,0 +1,45 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: '2.0'
+info:
+  title: hello
+  version: 1.0.0
+  x-java-interface: org.apache.servicecomb.samples.jaxrs.Hello
+basePath: /pojo/rest/hello
+produces:
+  - application/json
+
+paths:
+  /sayhi:
+    post:
+      operationId: sayHi
+      parameters:
+        - name: name
+          in: body
+          required: true
+          schema:
+            type: string
+      responses:
+        200:
+          description: 正确返回
+          schema:
+            type: string
+        default:
+          description: 默认返回
+          schema:
+            type: string
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-provider/pom.xml b/java-chassis-samples/jaxrs-sample/jaxrs-provider/pom.xml
new file mode 100644
index 0000000..4ed3da8
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-provider/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>jaxrs-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>jaxrs-provider</artifactId>
+  <name>Java Chassis::Samples::JAXRS::Provider</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-jaxrs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/java/org/apache/servicecomb/samples/jaxrs/provider/JaxrsHelloImpl.java b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/java/org/apache/servicecomb/samples/jaxrs/provider/JaxrsHelloImpl.java
new file mode 100644
index 0000000..f26ad06
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/java/org/apache/servicecomb/samples/jaxrs/provider/JaxrsHelloImpl.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.jaxrs.provider;
+
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.servicecomb.provider.rest.common.RestSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+
+@RestSchema(schemaId = "jaxrsHello")
+@Path("/jaxrshello")
+@Produces(MediaType.APPLICATION_JSON)
+public class JaxrsHelloImpl implements Hello {
+
+  @Path("/sayhi")
+  @POST
+  @Override
+  public String sayHi(String name) {
+    return "Hello " + name;
+  }
+
+  @Path("/sayhello")
+  @POST
+  @Override
+  public String sayHello(Person person) {
+    return "Hello person " + person.getName();
+  }
+
+  @Path("/saybye")
+  @GET
+  public String sayBye() {
+    return "Bye !";
+  }
+}
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/java/org/apache/servicecomb/samples/jaxrs/provider/JaxrsProviderMain.java b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/java/org/apache/servicecomb/samples/jaxrs/provider/JaxrsProviderMain.java
new file mode 100644
index 0000000..e11967d
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/java/org/apache/servicecomb/samples/jaxrs/provider/JaxrsProviderMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.jaxrs.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class JaxrsProviderMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/log4j2.xml b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9302302
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/provider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/microservice.yaml b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..1fe5acc
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/microservice.yaml
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: jaxrstest-sample
+service_description:
+  name: jaxrs
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
diff --git a/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/microservices/hello/hello.yaml b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/microservices/hello/hello.yaml
new file mode 100644
index 0000000..fb9328b
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/jaxrs-provider/src/main/resources/microservices/hello/hello.yaml
@@ -0,0 +1,45 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: '2.0'
+info:
+  title: hello
+  version: 1.0.0
+  x-java-interface: org.apache.servicecomb.samples.jaxrs.Hello
+basePath: /pojo/rest/hello
+produces:
+  - application/json
+
+paths:
+  /sayhi:
+    post:
+      operationId: sayHi
+      parameters:
+        - name: name
+          in: body
+          required: true
+          schema:
+            type: string
+      responses:
+        200:
+          description: 正确返回
+          schema:
+            type: string
+        default:
+          description: 默认返回
+          schema:
+            type: string
diff --git a/java-chassis-samples/jaxrs-sample/pom.xml b/java-chassis-samples/jaxrs-sample/pom.xml
new file mode 100644
index 0000000..a4929fb
--- /dev/null
+++ b/java-chassis-samples/jaxrs-sample/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>jaxrs-sample</artifactId>
+  <name>Java Chassis::Samples::JAXRS</name>
+  <packaging>pom</packaging>
+  <modules>
+    <module>jaxrs-provider</module>
+    <module>jaxrs-consumer</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/local-service-registry/README.md b/java-chassis-samples/local-service-registry/README.md
new file mode 100644
index 0000000..8b7c28b
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/README.md
@@ -0,0 +1,50 @@
+## Local registry
+
+User can use local registry mechanisam and can connect server endpoints without using service center.
+For local registry mechanism user should provide the local registry file at consumer side.
+User can start provider service and get the provider schema file and put at the consumer side.
+Consumer will use local registry function and it will connect the server end points.
+
+Please find the details as follows.
+
+## Provider Side
+
+* run the provider with/without service center and get the schema file.
+
+## Consumer Side changes
+
+* Add local registry file registry.yaml :
+
+  ```yaml
+  localserv:
+    - id: "100"
+      version: "0.0.1"
+      appid: localservreg
+      schemaIds:
+        - localservregistry
+      instances:
+        - endpoints:
+          - rest://localhost:8080
+          - highway://localhost:7070
+  ```
+
+* Add the following code at the beginning and end of the service consumer Main function
+
+```java
+    public class xxxClient {
+      public static void main(String[] args) {
+      //"yourregistry.yaml" should be put in resource directory
+      System.setProperty("local.registry.file", "yourregistry.yaml");
+
+      //your code
+      }
+    }
+```
+   if file present in this path "local.registry.file" then registry mode is Local registry mode. It will not connect to service center.
+
+* Add provider's schema file at below location of consumer side
+
+  src/main/resources/microservices/{microserviceName}/{schemaId.yaml}
+  -here microserviceName is servers's microservice name. Like this multiple schemaId files we can put in same location.
+
+* Run the consumer and verify the API's output.
diff --git a/java-chassis-samples/local-service-registry/local-registry-client/pom.xml b/java-chassis-samples/local-service-registry/local-registry-client/pom.xml
new file mode 100644
index 0000000..feb01de
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-client/pom.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>local-service-registry</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>local-registry-client</artifactId>
+  <name>Java Chassis::Demo::LocalServiceRegistry::Client</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/java-chassis-samples/local-service-registry/local-registry-client/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryclient/LocalRegistryClient.java b/java-chassis-samples/local-service-registry/local-registry-client/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryclient/LocalRegistryClient.java
new file mode 100644
index 0000000..a6fdabb
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-client/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryclient/LocalRegistryClient.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.localregistry.localregistryclient;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.web.client.RestTemplate;
+
+public class LocalRegistryClient {
+  private static RestTemplate templateNew = RestTemplateBuilder.create();
+
+  public static void main(String[] args) {
+    System.setProperty("local.registry.file", "registry.yaml");
+
+    BeanUtils.init();
+
+    run();
+  }
+
+  public static void run() {
+    testLocalRegistry(templateNew);
+  }
+
+  private static void testLocalRegistry(RestTemplate template) {
+    String microserviceName = "localserv";
+    String cseUrlPrefix = "cse://" + microserviceName + "/localservregistry/";
+
+    Map<String, String> params = new HashMap<>();
+    params.put("a", "5");
+    params.put("b", "20");
+    int result = template.postForObject(cseUrlPrefix + "add", params, Integer.class);
+    System.out.println(result);
+
+    Person person = new Person();
+    person.setName("local registry test");
+    Person sayHiResult = template
+        .postForObject(
+            cseUrlPrefix + "sayhi",
+            person,
+            Person.class);
+
+    System.out.println(sayHiResult.getName());
+  }
+}
diff --git a/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/log4j2.xml b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..1d58711
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/consumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/microservice.yaml b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..4a4da5a
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/microservice.yaml
@@ -0,0 +1,26 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: localservreg
+service_description:
+  name: localclient
+  version: 0.0.1
+servicecomb:
+  handler:
+    chain:
+      Consumer:
+        default: bizkeeper-consumer,loadbalance
diff --git a/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/microservices/localserv/hello.yaml b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/microservices/localserv/hello.yaml
new file mode 100644
index 0000000..de3c2d2
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/microservices/localserv/hello.yaml
@@ -0,0 +1,69 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: "2.0"
+info:
+  version: "1.0.0"
+  title: "swagger definition for org.apache.servicecomb.samples.localregistry.localregistryserver.LocalServerApi"
+  x-java-interface: "cse.gen.localservreg.localserv.localservregistry.LocalServerApiIntf"
+basePath: "/localservregistry"
+consumes:
+- "application/json"
+produces:
+- "application/json"
+paths:
+  /add:
+    post:
+      operationId: "add"
+      parameters:
+      - name: "a"
+        in: "formData"
+        required: false
+        type: "integer"
+        format: "int32"
+      - name: "b"
+        in: "formData"
+        required: false
+        type: "integer"
+        format: "int32"
+      responses:
+        200:
+          description: "response of 200"
+          schema:
+            type: "integer"
+            format: "int32"
+  /sayhi:
+    post:
+      operationId: "sayHi"
+      parameters:
+      - in: "body"
+        name: "student"
+        required: false
+        schema:
+          $ref: "#/definitions/Person"
+      responses:
+        200:
+          description: "response of 200"
+          schema:
+            $ref: "#/definitions/Person"
+definitions:
+  Person:
+    type: "object"
+    properties:
+      name:
+        type: "string"
+    x-java-class: "org.apache.servicecomb.samples.common.schema.models.Person"
diff --git a/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/registry.yaml b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/registry.yaml
new file mode 100644
index 0000000..4a27438
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-client/src/main/resources/registry.yaml
@@ -0,0 +1,27 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+localserv:
+  - id: "100"
+    version: "0.0.1"
+    appid: localservreg
+    schemaIds:
+      - hello
+    instances:
+      - endpoints:
+        - rest://localhost:8080
+        - highway://localhost:7070
\ No newline at end of file
diff --git a/java-chassis-samples/local-service-registry/local-registry-server/pom.xml b/java-chassis-samples/local-service-registry/local-registry-server/pom.xml
new file mode 100644
index 0000000..1dbf5c9
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-server/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>local-service-registry</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>local-registry-server</artifactId>
+  <name>Java Chassis::Demo::LocalRegistry::Server</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-jaxrs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>com.github.odavid.maven.plugins</groupId>
+        <artifactId>mixin-maven-plugin</artifactId>
+        <version>0.1-alpha-39</version>
+        <configuration>
+          <mixins>
+            <mixin>
+              <groupId>org.apache.servicecomb.demo</groupId>
+              <artifactId>docker-build-config</artifactId>
+              <version>${project.version}</version>
+            </mixin>
+          </mixins>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/java-chassis-samples/local-service-registry/local-registry-server/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryserver/LocalRegistryServer.java b/java-chassis-samples/local-service-registry/local-registry-server/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryserver/LocalRegistryServer.java
new file mode 100644
index 0000000..55f7e5d
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-server/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryserver/LocalRegistryServer.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.localregistry.localregistryserver;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class LocalRegistryServer {
+  public static void main(String[] args) {
+    System.setProperty("local.registry.file", "notExistJustForceLocal");
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/local-service-registry/local-registry-server/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryserver/LocalServerApi.java b/java-chassis-samples/local-service-registry/local-registry-server/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryserver/LocalServerApi.java
new file mode 100644
index 0000000..e5fea87
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-server/src/main/java/org/apache/servicecomb/samples/localregistry/localregistryserver/LocalServerApi.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.localregistry.localregistryserver;
+
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.apache.servicecomb.provider.rest.common.RestSchema;
+
+@RestSchema(schemaId = "hello")
+@Path("/localservregistry")
+@Produces(MediaType.APPLICATION_JSON)
+public class LocalServerApi {
+
+  @Path("/add")
+  @POST
+  public int add(@FormParam("a") int a, @FormParam("b") int b) {
+    return a + b;
+  }
+
+  @Path("/sayhi")
+  @POST
+  public Person sayHi(Person student) {
+    student.setName("hello " + student.getName());
+    return student;
+  }
+}
diff --git a/java-chassis-samples/local-service-registry/local-registry-server/src/main/resources/log4j2.xml b/java-chassis-samples/local-service-registry/local-registry-server/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9302302
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-server/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/provider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/local-service-registry/local-registry-server/src/main/resources/microservice.yaml b/java-chassis-samples/local-service-registry/local-registry-server/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..ed2b8fc
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/local-registry-server/src/main/resources/microservice.yaml
@@ -0,0 +1,30 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: localservreg
+service_description:
+  name: localserv
+  version: 0.0.1
+servicecomb:
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
+  handler:
+    chain:
+      Provider:
+        default: bizkeeper-provider
diff --git a/java-chassis-samples/local-service-registry/pom.xml b/java-chassis-samples/local-service-registry/pom.xml
new file mode 100644
index 0000000..104fb88
--- /dev/null
+++ b/java-chassis-samples/local-service-registry/pom.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>local-service-registry</artifactId>
+  <name>Java Chassis::Demo::Local service registry</name>
+  <packaging>pom</packaging>
+  <modules>
+    <module>local-registry-server</module>
+    <module>local-registry-client</module>
+  </modules>
+
+</project>
diff --git a/java-chassis-samples/metrics-extend-healthcheck/README.md b/java-chassis-samples/metrics-extend-healthcheck/README.md
new file mode 100644
index 0000000..97bac1b
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/README.md
@@ -0,0 +1,52 @@
+# Extend Metrics Health Checker Sample
+## What is Health Checker
+Because micro-services is desgin by SRP(Single Responsibility Principle),one micro-service always depend on many components such as middle-ware like queue,database etc and other micro-services,so if one micro-service report failure,we want fast know what is the cause and more details to help us solve the problem.
+
+Health check mechanism can let user write some logic to check components of micro-service dependent and return check result.
+
+## How to use
+### Add your checker implementation
+Implement *org.apache.servicecomb.foundation.metrics.health.HealthChecker* interface:  
+```java
+public interface HealthChecker {
+  String getName();
+
+  HealthCheckResult check();
+}
+```
+
+Then add the implementation class into **META-INF.service.org.apache.servicecomb.foundation.metrics.health.HealthChecker** by SPI(Service Provider Interface) way
+
+In this demo,we had make two checkers :
+1. CustomHealthChecker    
+  always return true checker   
+2. MySqlHealthChecker    
+  sim check mysql can connect checker  
+
+### Add Dependency in POM
+```xml
+<dependency>
+  <groupId>org.apache.servicecomb</groupId>
+  <artifactId>metrics-core</artifactId>
+  <version>{version}</version>
+</dependency>
+```
+
+### Start service
+```bash
+mvn spring-boot:run
+```
+
+### Do check and get result
+If you had config rest transport address in microservice.yaml like:
+```yaml
+cse:
+  rest:
+    address: 0.0.0.0:7777
+```
+
+Then you can invoke http://{serverip}:7777/health get summary check result : true or false.
+
+**Only all registered health checker confirm isHealthy=true,the  summary check result will be true,otherwise false**
+
+Also can invoke http://{serverip}:7777/health/details get details of each health checker reported.
\ No newline at end of file
diff --git a/java-chassis-samples/metrics-extend-healthcheck/pom.xml b/java-chassis-samples/metrics-extend-healthcheck/pom.xml
new file mode 100644
index 0000000..c14640e
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/pom.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>samples</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>metrics-extend-healthcheck</artifactId>
+  <name>Java Chassis::Samples::Metrics::Health Check</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>spring-boot-starter-provider</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.hibernate.validator</groupId>
+      <artifactId>hibernate-validator</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>metrics-core</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+        <version>2.1.2.RELEASE</version>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/CustomHealthChecker.java b/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/CustomHealthChecker.java
new file mode 100644
index 0000000..bd53aa0
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/CustomHealthChecker.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.metrics.extendhealthcheck;
+
+import org.apache.servicecomb.foundation.metrics.health.HealthCheckResult;
+import org.apache.servicecomb.foundation.metrics.health.HealthChecker;
+
+
+public class CustomHealthChecker implements HealthChecker {
+  @Override
+  public String getName() {
+    return "custom";
+  }
+
+  @Override
+  public HealthCheckResult check() {
+    return new HealthCheckResult(true, "custom", "no extra data");
+  }
+}
diff --git a/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/ExtendHealthCheckApplication.java b/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/ExtendHealthCheckApplication.java
new file mode 100644
index 0000000..5467ba0
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/ExtendHealthCheckApplication.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.metrics.extendhealthcheck;
+
+import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@EnableServiceComb
+public class ExtendHealthCheckApplication {
+  public static void main(String[] args) {
+    SpringApplication.run(ExtendHealthCheckApplication.class, args);
+  }
+}
diff --git a/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/MySqlHealthChecker.java b/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/MySqlHealthChecker.java
new file mode 100644
index 0000000..6e11578
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/src/main/java/org/apache/servicecomb/samples/metrics/extendhealthcheck/MySqlHealthChecker.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.metrics.extendhealthcheck;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+import org.apache.servicecomb.foundation.metrics.health.HealthCheckResult;
+import org.apache.servicecomb.foundation.metrics.health.HealthChecker;
+
+
+//this is a demo health checker for mysql
+public class MySqlHealthChecker implements HealthChecker {
+  @Override
+  public String getName() {
+    return "mysql";
+  }
+
+  @Override
+  public HealthCheckResult check() {
+    //add your health check code here
+    Connection connection = null;
+    try {
+      connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test_db?useSSL=false", "root", "pwd");
+      return new HealthCheckResult(true, "local mysql health check", "");
+    } catch (SQLException e) {
+      e.printStackTrace();
+      return new HealthCheckResult(false, "local mysql health check", e.toString());
+    } finally {
+      if (connection != null) {
+        try {
+          connection.close();
+        } catch (SQLException e) {
+          e.printStackTrace();
+        }
+      }
+    }
+  }
+}
diff --git a/java-chassis-samples/metrics-extend-healthcheck/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.metrics.health.HealthChecker b/java-chassis-samples/metrics-extend-healthcheck/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.metrics.health.HealthChecker
new file mode 100644
index 0000000..f6b0794
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.metrics.health.HealthChecker
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.servicecomb.samples.metrics.extendhealthcheck.CustomHealthChecker
+org.apache.servicecomb.samples.metrics.extendhealthcheck.MySqlHealthChecker
\ No newline at end of file
diff --git a/java-chassis-samples/metrics-extend-healthcheck/src/main/resources/microservice.yaml b/java-chassis-samples/metrics-extend-healthcheck/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..cb1bf60
--- /dev/null
+++ b/java-chassis-samples/metrics-extend-healthcheck/src/main/resources/microservice.yaml
@@ -0,0 +1,30 @@
+#
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+# all interconnected microservices must belong to an application wth the same ID
+APPLICATION_ID: metrics
+service_description:
+# name of the declaring microservice
+  name: metricsHealthCheckDemo
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:7777
\ No newline at end of file
diff --git a/java-chassis-samples/metrics-write-file-sample/README.md b/java-chassis-samples/metrics-write-file-sample/README.md
new file mode 100644
index 0000000..8f3a32c
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/README.md
@@ -0,0 +1,28 @@
+# Write Metrics Data into Separate Text Files Sample
+## Purpose
+This sample show how direct get metrics data and write them into separate text files,then other monitor system can load this file in order to get run state of micro-service.
+
+## What Contains
+### metrics-write-file Module
+This module contains the code how poll Monitors data from MonitorManager and convert data to a special format,then write into files.
+
+**We had designed that will use common Logging component for write file**,and there are many logging implements like log4j,log4j2,logback etc...,so we create *MetricsFileWriter* interface for later autowire.
+
+### metrics-write-file-log4j2-springboot Module
+This module contain log4j2 MetricsFileWriter implement if your project use it as Logging component.
+
+### metrics-write-file-log4j-springboot Module
+This module contain log4j MetricsFileWriter implement if your project use it as Logging component.
+
+## How to use
+Startup ServiceApplication in  metrics-write-file-log4j2-springboot or metrics-write-file-log4j-springboot
+
+1. If start service by maven
+```bash
+mvn spring-boot:run
+```
+you can see metric files had generated in **samples/metrics-write-file-sample/metrics-write-file-log4j(log4j2)-springboot/target/metric** folder,open your browser and make a request to http://localhost:8080/f ,wait a moment then you can see invocation metric files also be generated.
+
+2. If start service by IDE   
+
+you can see metric files had generated in **target/metric** folder,open your browser and make a request to http://localhost:8080/f ,wait a moment then you can see invocation metric files also be generated.
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/pom.xml b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/pom.xml
new file mode 100644
index 0000000..7f1633a
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>metrics-write-file-sample</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>metrics-write-file</artifactId>
+  <name>Java Chassis::Samples::Metrics::Write File</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>metrics-core</artifactId>
+    </dependency>
+
+    <!--     <dependency> -->
+    <!--       <groupId>org.apache.logging.log4j</groupId> -->
+    <!--       <artifactId>log4j-core</artifactId> -->
+    <!--     </dependency> -->
+    <!--     <dependency> -->
+    <!--       <groupId>org.apache.logging.log4j</groupId> -->
+    <!--       <artifactId>log4j-slf4j-impl</artifactId> -->
+    <!--     </dependency> -->
+
+    <!--     <dependency> -->
+    <!--       <groupId>ch.qos.logback</groupId> -->
+    <!--       <artifactId>logback-classic</artifactId> -->
+    <!--     </dependency> -->
+
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java
new file mode 100644
index 0000000..0e85fcf
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeFilePublisher.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.mwf;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.servicecomb.foundation.common.net.NetUtils;
+import org.apache.servicecomb.foundation.common.utils.JsonUtils;
+import org.apache.servicecomb.foundation.metrics.MetricsBootstrapConfig;
+import org.apache.servicecomb.foundation.metrics.MetricsInitializer;
+import org.apache.servicecomb.foundation.metrics.PolledEvent;
+import org.apache.servicecomb.foundation.metrics.registry.GlobalRegistry;
+import org.apache.servicecomb.serviceregistry.RegistryUtils;
+import org.apache.servicecomb.serviceregistry.api.registry.Microservice;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.MDC;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+import com.netflix.config.DynamicPropertyFactory;
+import com.netflix.spectator.api.Measurement;
+import com.netflix.spectator.api.Meter;
+import com.netflix.spectator.api.Tag;
+
+/**
+ * a sample for cloud eye
+ *
+ * related product only used logback or log4j2
+ * both logback and log4j2 support write to different log file depend on different MDC value
+ *
+ * reference sample-logback.xml and sample-log4j2.xml
+ */
+public class CloudEyeFilePublisher implements MetricsInitializer {
+  private static final Logger LOGGER = LoggerFactory.getLogger(CloudEyeFilePublisher.class);
+
+  private static final Logger CLOUD_EYE_LOGGER = LoggerFactory.getLogger("cloudEyeLogger");
+
+  private String filePrefix;
+
+  private String hostName;
+
+  @Override
+  public void init(GlobalRegistry globalRegistry, EventBus eventBus, MetricsBootstrapConfig config) {
+    eventBus.register(this);
+
+    Microservice microservice = RegistryUtils.getMicroservice();
+    filePrefix = microservice.getAppId() + "." + microservice.getServiceName();
+
+    hostName = NetUtils.getHostName();
+    if (StringUtils.isEmpty(hostName)) {
+      hostName = NetUtils.getHostAddress();
+    }
+
+    System.setProperty("cloudEye.logDir",
+        DynamicPropertyFactory
+            .getInstance()
+            .getStringProperty("cloudEye.logDir", "logs")
+            .get());
+  }
+
+  @Subscribe
+  public void onPolledEvent(PolledEvent event) {
+    long now = System.currentTimeMillis();
+    for (Meter meter : event.getMeters()) {
+      for (Measurement measurement : meter.measure()) {
+        logMeasurement(measurement, now);
+      }
+    }
+  }
+
+  protected void logMeasurement(Measurement measurement, long now) {
+    String metricKey = generateMetricKey(measurement);
+
+    MDC.put("fileName", filePrefix + "." + metricKey + ".dat");
+
+    CloudEyeMetricModel metricModel = new CloudEyeMetricModel();
+    metricModel.setNode(hostName);
+    metricModel.setTimestamp(now);
+    metricModel.getDynamicValue().put(metricKey, String.valueOf(measurement.value()));
+
+    CloudEyeModel model = new CloudEyeModel();
+    model.setPlugin_id(filePrefix);
+    model.setMetric(metricModel);
+
+    try {
+      CLOUD_EYE_LOGGER.info(JsonUtils.writeValueAsString(model));
+    } catch (JsonProcessingException e) {
+      LOGGER.error("Failed to write cloud eye log.", e);
+    }
+  }
+
+  protected String generateMetricKey(Measurement measurement) {
+    StringBuilder sb = new StringBuilder();
+    sb.append(measurement.id().name());
+    for (Tag tag : measurement.id().tags()) {
+      sb.append('.').append(tag.value());
+    }
+    return sb.toString();
+  }
+}
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeMetricModel.java b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeMetricModel.java
new file mode 100644
index 0000000..9bf1dab
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeMetricModel.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.mwf;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+
+public class CloudEyeMetricModel {
+  private String node;
+
+  private String scope_name;
+
+  private long timestamp;
+
+  private String inface_name;
+
+  @JsonAnySetter
+  private Map<String, String> dynamicValue = new HashMap<>();
+
+  public String getNode() {
+    return node;
+  }
+
+  public void setNode(String node) {
+    this.node = node;
+  }
+
+  public String getScope_name() {
+    return scope_name;
+  }
+
+  public void setScope_name(String scope_name) {
+    this.scope_name = scope_name;
+  }
+
+  public long getTimestamp() {
+    return timestamp;
+  }
+
+  public void setTimestamp(long timestamp) {
+    this.timestamp = timestamp;
+  }
+
+  public String getInface_name() {
+    return inface_name;
+  }
+
+  public void setInface_name(String inface_name) {
+    this.inface_name = inface_name;
+  }
+
+  @JsonAnyGetter
+  public Map<String, String> getDynamicValue() {
+    return dynamicValue;
+  }
+
+  public void setDynamicValue(Map<String, String> dynamicValue) {
+    this.dynamicValue = dynamicValue;
+  }
+}
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeModel.java b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeModel.java
new file mode 100644
index 0000000..f91acfc
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/CloudEyeModel.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.mwf;
+
+public class CloudEyeModel {
+  private String plugin_id;
+
+  private CloudEyeMetricModel metric;
+
+  public String getPlugin_id() {
+    return plugin_id;
+  }
+
+  public void setPlugin_id(String plugin_id) {
+    this.plugin_id = plugin_id;
+  }
+
+  public CloudEyeMetricModel getMetric() {
+    return metric;
+  }
+
+  public void setMetric(CloudEyeMetricModel metric) {
+    this.metric = metric;
+  }
+}
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.metrics.MetricsInitializer b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.metrics.MetricsInitializer
new file mode 100644
index 0000000..3a6ad61
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/META-INF/services/org.apache.servicecomb.foundation.metrics.MetricsInitializer
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.servicecomb.samples.mwf.CloudEyeFilePublisher
\ No newline at end of file
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/sample-log4j2.xml b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/sample-log4j2.xml
new file mode 100644
index 0000000..06fded2
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/sample-log4j2.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<Configuration status="INFO">
+  <Appenders>
+    <Console name="stdout" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%level] [%thread] - %msg (%F:%L\)%n"/>
+    </Console>
+
+    <Routing name="cloudEyeRouting">
+      <Routes pattern="$${ctx:fileName}">
+        <Route>
+          <File name="cloudEyeAppender-${ctx:fileName}" append="true"
+            fileName="${sys:cloudEye.logDir}/${ctx:fileName}">
+            <PatternLayout>
+              <Pattern>%msg%n</Pattern>
+            </PatternLayout>
+          </File>
+        </Route>
+      </Routes>
+    </Routing>
+  </Appenders>
+
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="stdout"/>
+    </Root>
+
+    <Logger name="cloudEyeLogger" level="info" additivity="false">
+      <Appender-ref ref="cloudEyeRouting"/>
+    </Logger>
+  </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/sample-logback.xml b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/sample-logback.xml
new file mode 100644
index 0000000..1803d81
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/metrics-write-file/src/main/resources/sample-logback.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration scan="true">
+  <jmxConfigurator/>
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d [%level] [%thread] - %msg (%F:%L\)%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="INFO">
+    <appender-ref ref="STDOUT"/>
+  </root>
+
+  <appender name="cloudEyeAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
+    <!--   This is MDC value -->
+    <discriminator>
+      <key>fileName</key>
+      <defaultValue>unknown</defaultValue>
+    </discriminator>
+
+    <sift>
+      <appender name="cloudEyeAppender-${fileName}" class="ch.qos.logback.core.FileAppender">
+        <file>${cloudEye.logDir}/${fileName}</file>
+        <append>true</append>
+        <layout class="ch.qos.logback.classic.PatternLayout">
+          <pattern>%msg%n</pattern>
+        </layout>
+      </appender>
+    </sift>
+  </appender>
+
+  <logger name="cloudEyeLogger" level="info" additivity="false">
+    <appender-ref ref="cloudEyeAppender"/>
+  </logger>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/metrics-write-file-sample/pom.xml b/java-chassis-samples/metrics-write-file-sample/pom.xml
new file mode 100644
index 0000000..8c46ff2
--- /dev/null
+++ b/java-chassis-samples/metrics-write-file-sample/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>samples</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>metrics-write-file-sample</artifactId>
+  <name>Java Chassis::Samples::Metrics</name>
+  <packaging>pom</packaging>
+  <modules>
+    <module>metrics-write-file</module>
+  </modules>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>metrics-core</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+</project>
diff --git a/java-chassis-samples/pojo-sample/README.md b/java-chassis-samples/pojo-sample/README.md
new file mode 100644
index 0000000..be92196
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/README.md
@@ -0,0 +1,91 @@
+## POJO Sample
+
+POJO is also called as Transparent Remote Procedure Call (RPC), POJO development mode based on API and API implementation. The service developer does not need to use the description of Spring MVC and JAX-RS.
+
+### Provider Service
+
+The transparent RPC development mode supports two service release mode: Spring XML configuration and annotation configuration. 
+
+The Spring XML Configuration Mode:
+
+* Define a service API. Compile the Java API definition based on the API definition defined before development. 
+* Implement the service. 
+* Release the service. Create the `pojoHello.bean.xml` file in the `resources/META-INF/spring` directory and declare the schema in the file. 
+
+The Develop Method by Configure Remarks:
+
+* Define a service API, which is the same as the Spring XML mode
+* Implement the service in the same way as using Spring XML.
+* Release the service. `@RpcSchema` is used to define schema during the API Hello implementation. 
+
+[Detail information please refer to Doc](http://servicecomb.apache.org/users/develop-with-transparent-rpc/)
+
+### Consumer Service
+
+To call a microservice, you only need to declare a member of a service API type and add the `@RpcReference` annotation for the member, the microservice that depends on the declaration, and the `schemaID`. The sample code is as follows.
+
+```java
+@Component
+public class CodeFirstConsumerMain {
+    @RpcReference(microserviceName = "codefirst", schemaId = "codeFirstHello")
+    private static Hello hello;
+    public static void main(String[] args) throws Exception {
+     	//init first
+        System.out.println(hello.sayHi("World!"));
+    }
+}
+```
+
+[Detail information please refer to Doc](http://servicecomb.apache.org/users/develop-with-rpc/)
+
+### Sample Quick Start
+
+1. Start the ServiceComb/Service Center
+
+   - [how to start the service center](http://servicecomb.apache.org/users/setup-environment/#)
+   - make sure service center address is configured correctly in `microservice.yaml` file
+
+   ```yaml
+   cse:
+     service:
+       registry:
+         address: http://127.0.0.1:30100		#service center address
+   ```
+
+2. Start the pojo-provider service
+
+   - Start provider service by maven
+
+     Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `PojoProviderMain`.
+
+     ```bash
+     cd servicecomb-java-chassis/
+     mvn clean install -Psamples -DskipTests			#only need to install at first time.
+     cd samples/pojo-sample/pojo-provider/
+     mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.pojo.provider.PojoProviderMain"
+     ```
+
+   - Start provider service by IDE
+
+     Import the project by InteliJ IDEA or Eclipse, add sample module to pom.xml file in root module `servicecomb-java-chassis/pom.xml`, and add `<module>samples</module>` to `<modules></modules>` block, Then find `main` function `PojoProviderMain` of provider service and `RUN` it like any other Java program.
+
+3. Start the pojo-consumer service 
+
+   Just like how to start pojo-provider service. But the main class of pojo-consumer service is `PojoConsumerMain`. 
+
+   ```bash
+   cd samples/pojo-sample/pojo-consumer/
+   mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.pojo.consumer.PojoConsumerMain"
+   ```
+
+4. How to verify
+   On the producer side, the output should contain the following stuffs if the producer starts up successfully:
+   1. *'swagger: 2.0 info: version: 1.0.0 ...'* means the producer generated swagger contracts
+   2. *'rest listen success. address=0.0.0.0:8080'* means the rest endpoint is listening on port 8080
+   3. *'highway listen success. address=0.0.0.0:7070'* means the highway endpoint is listening on port 7070
+   4. *'Register microservice instance success'* means the producer has registered successfully to service center
+   
+   On the consumer side, you can see the following outputs if the consumer can invoke the producer:
+   1. *'Hello person ServiceComb/Java Chassis'* means the consumer calls sayHello by RpcReference successfully
+   2. *'a=1, b=2, result=3'* means the consumer calls compute.add by RpcReference successfully
+   ​
\ No newline at end of file
diff --git a/java-chassis-samples/pojo-sample/pojo-consumer/pom.xml b/java-chassis-samples/pojo-sample/pojo-consumer/pom.xml
new file mode 100644
index 0000000..9cfd555
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-consumer/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>pojo-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>pojo-consumer</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/pojo-sample/pojo-consumer/src/main/java/org/apache/servicecomb/samples/pojo/Compute.java b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/java/org/apache/servicecomb/samples/pojo/Compute.java
new file mode 100644
index 0000000..418e319
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/java/org/apache/servicecomb/samples/pojo/Compute.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.pojo;
+
+public interface Compute {
+
+  int add(int a, int b);
+
+  int multi(int a, int b);
+
+  int sub(int a, int b);
+
+  int divide(int a, int b);
+}
diff --git a/java-chassis-samples/pojo-sample/pojo-consumer/src/main/java/org/apache/servicecomb/samples/pojo/consumer/PojoConsumerMain.java b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/java/org/apache/servicecomb/samples/pojo/consumer/PojoConsumerMain.java
new file mode 100644
index 0000000..ab1f6ce
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/java/org/apache/servicecomb/samples/pojo/consumer/PojoConsumerMain.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.pojo.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.apache.servicecomb.samples.pojo.Compute;
+import org.springframework.stereotype.Component;
+
+@Component
+public class PojoConsumerMain {
+
+  @RpcReference(microserviceName = "hello", schemaId = "hello")
+  private static Hello hello;
+
+  @RpcReference(microserviceName = "hello", schemaId = "codeFirstCompute")
+  public static Compute compute;
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    System.out.println(hello.sayHi("Java Chassis"));
+    Person person = new Person();
+    person.setName("ServiceComb/Java Chassis");
+    System.out.println(hello.sayHello(person));
+    System.out.println("a=1, b=2, result=" + compute.add(1, 2));
+  }
+}
diff --git a/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/log4j2.xml b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..1d58711
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/consumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/microservice.yaml b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..0709396
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/microservice.yaml
@@ -0,0 +1,35 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: pojo-sample
+service_description:
+  name: helloClient
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  handler:
+    chain:
+      Consumer:
+        default: bizkeeper-consumer,loadbalance
+  isolation:
+    Consumer:
+      enabled: false
+  references:
+    hello:
+      version-rule: 0.0.1
diff --git a/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/microservices/hello/hello.yaml b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/microservices/hello/hello.yaml
new file mode 100644
index 0000000..32714e6
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-consumer/src/main/resources/microservices/hello/hello.yaml
@@ -0,0 +1,72 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: '2.0'
+info:
+  title: hello
+  version: 1.0.0
+  x-java-interface: org.apache.servicecomb.samples.pojo.Hello
+basePath: /pojo/rest/hello
+produces:
+  - application/json
+
+paths:
+  /sayhi:
+    post:
+      operationId: sayHi
+      parameters:
+        - name: name
+          in: body
+          required: true
+          schema:
+            type: string
+      responses:
+        200:
+          description: 正确返回
+          schema:
+            type: string
+        default:
+          description: 默认返回
+          schema:
+            type: string
+  /sayhello:
+     post:
+          operationId: sayHello
+          parameters:
+            - name: person
+              in: body
+              required: true
+              schema:
+                $ref: "#/definitions/Person"
+          responses:
+            200:
+              description: 正确返回
+              schema:
+                type: string
+            default:
+              description: 默认返回
+              schema:
+                type: string
+definitions:
+  Person:
+    type: "object"
+    properties:
+      name:
+        type: "string"
+        description: "person name"
+    xml:
+      name: "Person"
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/pom.xml b/java-chassis-samples/pojo-sample/pojo-provider/pom.xml
new file mode 100644
index 0000000..caa1d4b
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>pojo-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>pojo-provider</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/Compute.java b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/Compute.java
new file mode 100644
index 0000000..418e319
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/Compute.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.pojo;
+
+public interface Compute {
+
+  int add(int a, int b);
+
+  int multi(int a, int b);
+
+  int sub(int a, int b);
+
+  int divide(int a, int b);
+}
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/CodeFirstComputeImpl.java b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/CodeFirstComputeImpl.java
new file mode 100644
index 0000000..6430ee1
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/CodeFirstComputeImpl.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.pojo.provider;
+
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.pojo.Compute;
+
+@RpcSchema(schemaId = "codeFirstCompute")
+public class CodeFirstComputeImpl implements Compute {
+  @Override
+  public int add(int a, int b) {
+    return a + b;
+  }
+
+  @Override
+  public int multi(int a, int b) {
+    return a * b;
+  }
+
+  @Override
+  public int sub(int a, int b) {
+    return a - b;
+  }
+
+  @Override
+  public int divide(int a, int b) {
+    if (b != 0) {
+      return a / b;
+    }
+    return 0;
+  }
+}
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/HelloImpl.java b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/HelloImpl.java
new file mode 100644
index 0000000..811640d
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/HelloImpl.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.pojo.provider;
+
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+
+@RpcSchema(schemaId = "hello")
+public class HelloImpl implements Hello {
+
+  @Override
+  public String sayHi(String name) {
+    return "Hello " + name;
+  }
+
+  @Override
+  public String sayHello(Person person) {
+    return "Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/PojoProviderMain.java b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/PojoProviderMain.java
new file mode 100644
index 0000000..ad18378
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/java/org/apache/servicecomb/samples/pojo/provider/PojoProviderMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.pojo.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class PojoProviderMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/log4j2.xml b/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9302302
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/provider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/microservice.yaml b/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..1eda650
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/microservice.yaml
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: pojo-sample
+service_description:
+  name: hello
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
diff --git a/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/microservices/hello/hello.yaml b/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/microservices/hello/hello.yaml
new file mode 100644
index 0000000..32714e6
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pojo-provider/src/main/resources/microservices/hello/hello.yaml
@@ -0,0 +1,72 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: '2.0'
+info:
+  title: hello
+  version: 1.0.0
+  x-java-interface: org.apache.servicecomb.samples.pojo.Hello
+basePath: /pojo/rest/hello
+produces:
+  - application/json
+
+paths:
+  /sayhi:
+    post:
+      operationId: sayHi
+      parameters:
+        - name: name
+          in: body
+          required: true
+          schema:
+            type: string
+      responses:
+        200:
+          description: 正确返回
+          schema:
+            type: string
+        default:
+          description: 默认返回
+          schema:
+            type: string
+  /sayhello:
+     post:
+          operationId: sayHello
+          parameters:
+            - name: person
+              in: body
+              required: true
+              schema:
+                $ref: "#/definitions/Person"
+          responses:
+            200:
+              description: 正确返回
+              schema:
+                type: string
+            default:
+              description: 默认返回
+              schema:
+                type: string
+definitions:
+  Person:
+    type: "object"
+    properties:
+      name:
+        type: "string"
+        description: "person name"
+    xml:
+      name: "Person"
diff --git a/java-chassis-samples/pojo-sample/pom.xml b/java-chassis-samples/pojo-sample/pom.xml
new file mode 100644
index 0000000..647dda7
--- /dev/null
+++ b/java-chassis-samples/pojo-sample/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>pojo-sample</artifactId>
+  <packaging>pom</packaging>
+  <modules>
+    <module>pojo-provider</module>
+    <module>pojo-consumer</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/pom.xml b/java-chassis-samples/pom.xml
new file mode 100644
index 0000000..04391da
--- /dev/null
+++ b/java-chassis-samples/pom.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>org.apache.servicecomb.samples</groupId>
+  <artifactId>samples</artifactId>
+  <name>Java Chassis::Samples</name>
+  <packaging>pom</packaging>
+  <version>2.0.0-SNAPSHOT</version>
+  <modules>
+    <module>codefirst-sample</module>
+    <module>custom-handler-sample</module>
+    <module>jaxrs-sample</module>
+    <module>pojo-sample</module>
+    <module>springmvc-sample</module>
+    <module>common-schema</module>
+    <module>auth-sample</module>
+    <module>bmi</module>
+    <module>metrics-write-file-sample</module>
+    <module>metrics-extend-healthcheck</module>
+    <module>config-apollo-sample</module>
+    <module>use-log4j2-sample</module>
+    <module>local-service-registry</module>
+    <module>trust-sample</module>
+    <module>apm-agent</module>
+  </modules>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>java-chassis-dependencies</artifactId>
+        <version>${project.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.servicecomb.samples</groupId>
+        <artifactId>common-schema</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <build>
+    <plugins>
+      <!-- 配置项目使用jdk1.8编译 -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <compilerArgument>-parameters</compilerArgument>
+          <encoding>UTF-8</encoding>
+          <source>1.8</source>
+          <target>1.8</target>
+          <compilerArgs>
+            <arg>-Werror</arg>
+            <arg>-Xlint:all</arg>
+            <!--not care for jdk8/jdk7 compatible problem-->
+            <arg>-Xlint:-classfile</arg>
+            <!--not care for annotation not processed-->
+            <arg>-Xlint:-processing</arg>
+          </compilerArgs>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <version>2.8.2</version>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <version>0.13</version>
+        <configuration>
+          <excludes>
+            <exclude>.travis.yml</exclude>
+            <exclude>**/*.md</exclude>
+            <exclude>**/target/*</exclude>
+            <!-- Skip the ssl configuration files -->
+            <exculde>**/resources/ssl/**</exculde>
+            <!-- Skip the protobuf files -->
+            <exclude>**/*.proto</exclude>
+            <!-- Skip the idl files -->
+            <exclude>**/*.idl</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/java-chassis-samples/springmvc-sample/README.md b/java-chassis-samples/springmvc-sample/README.md
new file mode 100644
index 0000000..308f33b
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/README.md
@@ -0,0 +1,63 @@
+# Spring MVC Sample
+
+`RestTemplate` is a RESTful API provide by the Spring framework. ServiceComb provides the API for service calling. Users can call microservices using customized URL and `RestTemplate` instance provided by ServiceComb regardless of the specific address of the service.
+
+* The URL must be in format of ServiceComb: `cse://microserviceName/path?querystring`.
+* During use of this URL format, the ServiceComb framework will perform internal microservice descovery, fallbreak, and fault tolerance and send the requests to the microservice providers.
+
+## Sample Quick Start
+
+1. Start the ServiceComb/Service Center
+
+   * [how to start the service center](http://servicecomb.apache.org/users/setup-environment/#)
+   * make sure service center address is configured correctly in `microservice.yaml` file
+
+   ```yaml
+   cse:
+     service:
+       registry:
+         address: http://127.0.0.1:30100		#service center address
+   ```
+
+2. Start the springmvc-provider service
+
+   * Start provider service by maven
+
+     Compile the source code at root directory of ServiceComb Java Chassis, which is `servicecomb-java-chassis/`, and use `mvn exec` to execute the main class `SpringmvcProviderMain`.
+
+     ```bash
+     cd servicecomb-java-chassis/
+     mvn clean install -Psamples -DskipTests		#Only need to install at first time
+     cd samples/springmvc-sample/springmvc-provider/
+     mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.springmvc.provider.SpringmvcProviderMain"
+     ```
+
+   * Start provider service by IDE
+
+     Import the project by InteliJ IDEA or Eclipse, add sample module to pom.xml file in root module `servicecomb-java-chassis/pom.xml`, and add `<module>samples</module>` to `<modules></modules>` block, Then find `main` function of provider service and `RUN` it like any other Java Program.
+
+3. Start the springmvc-consumer service
+
+   Just like how to start springmvc-provider service. But the main class of springmvc-consumer service is `SpringmvcConsumerMain`. 
+
+   ```bash
+   cd samples/springmvc-sample/springmvc-consumer/
+   mvn exec:java -Dexec.mainClass="org.apache.servicecomb.samples.springmvc.consumer.SpringmvcConsumerMain"
+   ```
+
+4. How to verify
+   On the producer side, the output should contain the following stuffs if the producer starts up successfully:
+   1. *'swagger: 2.0 info: version: 1.0.0 ...'* means the producer generated swagger contracts
+   2. *'rest listen success. address=0.0.0.0:8080'* means the rest endpoint is listening on port 8080
+   3. *'highway listen success. address=0.0.0.0:7070'* means the highway endpoint is listening on port 7070
+   4. *'Register microservice instance success'* means the producer has registered successfully to service center
+   
+   On the consumer side, you can see the following outputs if the consumer can invoke the producer:
+   1. *'RestTemplate consumer sayhi services: Hello Java Chassis'* means the consumer calls sayhi by RestTemplate successfully
+   2. *'RestTemplate consumer sayhello services: Hello person ServiceComb/Java Chassis'* means the consumer calls sayhello by RestTemplate successfully
+   3. *'POJO consumer sayhi services: Hello Java Chassis'* means the consumer calls sayhi by RpcReference successfully
+   4. *'POJO consumer sayhello services: Hello person ServiceComb/Java Chassis'* means the consumer calls sayhello by RpcReference successfully
+   ​
+## More
+
+[Develop with RestTemplate](http://servicecomb.apache.org/users/develop-with-rest-template/)
\ No newline at end of file
diff --git a/java-chassis-samples/springmvc-sample/pom.xml b/java-chassis-samples/springmvc-sample/pom.xml
new file mode 100644
index 0000000..cf99c05
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/pom.xml
@@ -0,0 +1,32 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>springmvc-sample</artifactId>
+  <packaging>pom</packaging>
+  <modules>
+    <module>springmvc-provider</module>
+    <module>springmvc-consumer</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/springmvc-sample/springmvc-consumer/pom.xml b/java-chassis-samples/springmvc-sample/springmvc-consumer/pom.xml
new file mode 100644
index 0000000..c177552
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-consumer/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>springmvc-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>springmvc-consumer</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/java/org/apache/servicecomb/samples/springmvc/consumer/SpringmvcConsumerMain.java b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/java/org/apache/servicecomb/samples/springmvc/consumer/SpringmvcConsumerMain.java
new file mode 100644
index 0000000..ef7ed95
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/java/org/apache/servicecomb/samples/springmvc/consumer/SpringmvcConsumerMain.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.springmvc.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
+import org.apache.servicecomb.provider.springmvc.reference.async.CseAsyncRestTemplate;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.util.concurrent.ListenableFuture;
+import org.springframework.util.concurrent.ListenableFutureCallback;
+import org.springframework.web.client.RestTemplate;
+
+@Component
+public class SpringmvcConsumerMain {
+  private static final Logger LOG = LoggerFactory.getLogger(SpringmvcConsumerMain.class);
+
+  private static RestTemplate restTemplate = RestTemplateBuilder.create();
+
+  @RpcReference(microserviceName = "springmvc", schemaId = "springmvcHello")
+  private static Hello hello;
+
+  public static void main(String[] args) throws Exception {
+    BeanUtils.init();
+    Person person = new Person();
+    person.setName("ServiceComb/Java Chassis");
+
+    // RestTemplate Consumer or POJO Consumer. You can choose whatever you like
+    // RestTemplate Consumer
+    String sayHiResult =
+        restTemplate.postForObject("cse://springmvc/springmvchello/sayhi?name=Java Chassis", null, String.class);
+    String sayHiDefaultResult =
+        restTemplate.postForObject("cse://springmvc/springmvchello/sayhi", null, String.class);
+    String sayHelloResult = restTemplate.postForObject("cse://springmvc/springmvchello/sayhello", person, String.class);
+    System.out.println("RestTemplate Consumer or POJO Consumer.  You can choose whatever you like.");
+    System.out.println("RestTemplate consumer sayhi services: " + sayHiResult);
+    System.out.println("RestTemplate consumer sayHiDefault services: " + sayHiDefaultResult);
+    System.out.println("RestTemplate consumer sayhello services: " + sayHelloResult);
+
+    // POJO Consumer
+    System.out.println("POJO consumer sayhi services: " + hello.sayHi("Java Chassis"));
+    System.out.println("POJO consumer sayhello services: " + hello.sayHello(person));
+
+    //AsyncRestTemplate Consumer
+    CseAsyncRestTemplate cseAsyncRestTemplate = new CseAsyncRestTemplate();
+    ListenableFuture<ResponseEntity<String>> responseEntityListenableFuture = cseAsyncRestTemplate
+        .postForEntity("cse://springmvc/springmvchello/sayhi?name=Java Chassis", null, String.class);
+    ResponseEntity<String> responseEntity = responseEntityListenableFuture.get();
+    System.out.println("AsyncRestTemplate Consumer sayHi services: " + responseEntity.getBody());
+
+    HttpEntity<Person> entity = new HttpEntity<>(person);
+    ListenableFuture<ResponseEntity<String>> listenableFuture = cseAsyncRestTemplate
+        .exchange("cse://springmvc/springmvchello/sayhello", HttpMethod.POST, entity, String.class);
+    //    ResponseEntity<String> responseEntity1 = listenableFuture.get();
+    //    System.out.println("AsyncRestTemplate Consumer sayHello services: " + responseEntity1.getBody());
+
+    listenableFuture.addCallback(
+        new ListenableFutureCallback<ResponseEntity<String>>() {
+          @Override
+          public void onFailure(Throwable ex) {
+            LOG.error("AsyncResTemplate Consumer catched exception when sayHello, ", ex);
+          }
+
+          @Override
+          public void onSuccess(ResponseEntity<String> result) {
+            System.out.println("AsyncRestTemplate Consumer sayHello services: " + result.getBody());
+          }
+        });
+  }
+}
diff --git a/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/log4j2.xml b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..1d58711
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/consumer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/microservice.yaml b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..af85274
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/microservice.yaml
@@ -0,0 +1,32 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: springmvc-sample
+service_description:
+  name: springmvcConsumer
+  version: 0.0.2
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  handler:
+    chain:
+      Consumer:
+        default: bizkeeper-consumer,loadbalance
+  isolation:
+    Consumer:
+      enabled: false
diff --git a/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/microservices/hello/hello.yaml b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/microservices/hello/hello.yaml
new file mode 100644
index 0000000..76007e9
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-consumer/src/main/resources/microservices/hello/hello.yaml
@@ -0,0 +1,72 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: '2.0'
+info:
+  title: hello
+  version: 1.0.0
+  x-java-interface: org.apache.servicecomb.samples.springmvc.Hello
+basePath: /pojo/rest/hello
+produces:
+  - application/json
+
+paths:
+  /sayhi:
+    post:
+      operationId: sayHi
+      parameters:
+        - name: name
+          in: body
+          required: true
+          schema:
+            type: string
+      responses:
+        200:
+          description: 正确返回
+          schema:
+            type: string
+        default:
+          description: 默认返回
+          schema:
+            type: string
+  /sayhello:
+     post:
+          operationId: sayHello
+          parameters:
+            - name: person
+              in: body
+              required: true
+              schema:
+                $ref: "#/definitions/Person"
+          responses:
+            200:
+              description: 正确返回
+              schema:
+                type: string
+            default:
+              description: 默认返回
+              schema:
+                type: string
+definitions:
+  Person:
+    type: "object"
+    properties:
+      name:
+        type: "string"
+        description: "person name"
+    xml:
+      name: "Person"
diff --git a/java-chassis-samples/springmvc-sample/springmvc-provider/pom.xml b/java-chassis-samples/springmvc-sample/springmvc-provider/pom.xml
new file mode 100644
index 0000000..c918dfb
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-provider/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>springmvc-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>springmvc-provider</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-springmvc</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/java/org/apache/servicecomb/samples/springmvc/provider/SpringmvcHelloImpl.java b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/java/org/apache/servicecomb/samples/springmvc/provider/SpringmvcHelloImpl.java
new file mode 100644
index 0000000..c8d8087
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/java/org/apache/servicecomb/samples/springmvc/provider/SpringmvcHelloImpl.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.springmvc.provider;
+
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.servicecomb.provider.rest.common.RestSchema;
+import org.apache.servicecomb.samples.common.schema.Hello;
+import org.apache.servicecomb.samples.common.schema.models.Person;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@RestSchema(schemaId = "springmvcHello")
+@RequestMapping(path = "/springmvchello", produces = MediaType.APPLICATION_JSON)
+public class SpringmvcHelloImpl implements Hello {
+  @Override
+  @RequestMapping(path = "/sayhi", method = RequestMethod.POST)
+  public String sayHi(@RequestParam(name = "name", defaultValue = "test") String name) {
+    return "Hello " + name;
+  }
+
+  @Override
+  @RequestMapping(path = "/sayhello", method = RequestMethod.POST)
+  public String sayHello(@RequestBody Person person) {
+    return "Hello person " + person.getName();
+  }
+}
diff --git a/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/java/org/apache/servicecomb/samples/springmvc/provider/SpringmvcProviderMain.java b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/java/org/apache/servicecomb/samples/springmvc/provider/SpringmvcProviderMain.java
new file mode 100644
index 0000000..1cbb2af
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/java/org/apache/servicecomb/samples/springmvc/provider/SpringmvcProviderMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.springmvc.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class SpringmvcProviderMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/log4j2.xml b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9302302
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/provider-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/microservice.yaml b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..af57813
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/microservice.yaml
@@ -0,0 +1,33 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: springmvc-sample
+service_description:
+  name: springmvc
+  version: 0.0.2
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
+  handler:
+    chain:
+      Provider:
+        default: bizkeeper-provider
diff --git a/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/microservices/hello/hello.yaml b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/microservices/hello/hello.yaml
new file mode 100644
index 0000000..76007e9
--- /dev/null
+++ b/java-chassis-samples/springmvc-sample/springmvc-provider/src/main/resources/microservices/hello/hello.yaml
@@ -0,0 +1,72 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+swagger: '2.0'
+info:
+  title: hello
+  version: 1.0.0
+  x-java-interface: org.apache.servicecomb.samples.springmvc.Hello
+basePath: /pojo/rest/hello
+produces:
+  - application/json
+
+paths:
+  /sayhi:
+    post:
+      operationId: sayHi
+      parameters:
+        - name: name
+          in: body
+          required: true
+          schema:
+            type: string
+      responses:
+        200:
+          description: 正确返回
+          schema:
+            type: string
+        default:
+          description: 默认返回
+          schema:
+            type: string
+  /sayhello:
+     post:
+          operationId: sayHello
+          parameters:
+            - name: person
+              in: body
+              required: true
+              schema:
+                $ref: "#/definitions/Person"
+          responses:
+            200:
+              description: 正确返回
+              schema:
+                type: string
+            default:
+              description: 默认返回
+              schema:
+                type: string
+definitions:
+  Person:
+    type: "object"
+    properties:
+      name:
+        type: "string"
+        description: "person name"
+    xml:
+      name: "Person"
diff --git a/java-chassis-samples/trust-sample/README.md b/java-chassis-samples/trust-sample/README.md
new file mode 100644
index 0000000..e3a0694
--- /dev/null
+++ b/java-chassis-samples/trust-sample/README.md
@@ -0,0 +1,4 @@
+## Trust Sample
+This sample shows using public key mechanism to authenticate user and black/white user list. The public key mechanism security is based on Service Center, and users should first configure Service Center authentication. This sample does not show how to configure Service Center authentication.
+
+In this sample, both customer and hacker try to access store, while store configure it's black list to deny hacker's access.
\ No newline at end of file
diff --git a/java-chassis-samples/trust-sample/customer/pom.xml b/java-chassis-samples/trust-sample/customer/pom.xml
new file mode 100644
index 0000000..9bf1fc6
--- /dev/null
+++ b/java-chassis-samples/trust-sample/customer/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>trust-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>customer</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-publickey-auth</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/trust-sample/customer/src/main/java/org/apache/servicecomb/samples/trust/Compute.java b/java-chassis-samples/trust-sample/customer/src/main/java/org/apache/servicecomb/samples/trust/Compute.java
new file mode 100644
index 0000000..b9557b2
--- /dev/null
+++ b/java-chassis-samples/trust-sample/customer/src/main/java/org/apache/servicecomb/samples/trust/Compute.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.trust;
+
+public interface Compute {
+
+  int add(int a, int b);
+
+  int multi(int a, int b);
+
+  int sub(int a, int b);
+
+  int divide(int a, int b);
+}
diff --git a/java-chassis-samples/trust-sample/customer/src/main/java/org/apache/servicecomb/samples/trust/consumer/CustomerMain.java b/java-chassis-samples/trust-sample/customer/src/main/java/org/apache/servicecomb/samples/trust/consumer/CustomerMain.java
new file mode 100644
index 0000000..69fd5b0
--- /dev/null
+++ b/java-chassis-samples/trust-sample/customer/src/main/java/org/apache/servicecomb/samples/trust/consumer/CustomerMain.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.trust.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.samples.trust.Compute;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CustomerMain {
+
+  @RpcReference(microserviceName = "store", schemaId = "codeFirstCompute")
+  public static Compute compute;
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    System.out.println("a=1, b=2, result=" + compute.add(1, 2));
+  }
+
+}
diff --git a/java-chassis-samples/trust-sample/customer/src/main/resources/log4j2.xml b/java-chassis-samples/trust-sample/customer/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..6ad0c70
--- /dev/null
+++ b/java-chassis-samples/trust-sample/customer/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/customer-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/trust-sample/customer/src/main/resources/microservice.yaml b/java-chassis-samples/trust-sample/customer/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..c96ce38
--- /dev/null
+++ b/java-chassis-samples/trust-sample/customer/src/main/resources/microservice.yaml
@@ -0,0 +1,37 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: trust-sample
+service_description:
+  name: customer
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  isolation:
+    Consumer:
+      enabled: false
+  references:
+    hello:
+      version-rule: 0.0.1
+  handler:
+    chain:
+      Consumer:
+        default: loadbalance,auth-consumer
+      Provider:
+        default: auth-provider
diff --git a/java-chassis-samples/trust-sample/hacker/pom.xml b/java-chassis-samples/trust-sample/hacker/pom.xml
new file mode 100644
index 0000000..f104ee3
--- /dev/null
+++ b/java-chassis-samples/trust-sample/hacker/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>trust-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>hacker</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-publickey-auth</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/trust-sample/hacker/src/main/java/org/apache/servicecomb/samples/trust/Compute.java b/java-chassis-samples/trust-sample/hacker/src/main/java/org/apache/servicecomb/samples/trust/Compute.java
new file mode 100644
index 0000000..b9557b2
--- /dev/null
+++ b/java-chassis-samples/trust-sample/hacker/src/main/java/org/apache/servicecomb/samples/trust/Compute.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.trust;
+
+public interface Compute {
+
+  int add(int a, int b);
+
+  int multi(int a, int b);
+
+  int sub(int a, int b);
+
+  int divide(int a, int b);
+}
diff --git a/java-chassis-samples/trust-sample/hacker/src/main/java/org/apache/servicecomb/samples/trust/consumer/HackerMain.java b/java-chassis-samples/trust-sample/hacker/src/main/java/org/apache/servicecomb/samples/trust/consumer/HackerMain.java
new file mode 100644
index 0000000..2ad9a78
--- /dev/null
+++ b/java-chassis-samples/trust-sample/hacker/src/main/java/org/apache/servicecomb/samples/trust/consumer/HackerMain.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.trust.consumer;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.provider.pojo.RpcReference;
+import org.apache.servicecomb.samples.trust.Compute;
+import org.springframework.stereotype.Component;
+
+@Component
+public class HackerMain {
+  @RpcReference(microserviceName = "store", schemaId = "codeFirstCompute")
+  public static Compute compute;
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+    System.out.println("a=1, b=2, result=" + compute.add(1, 2));
+  }
+}
diff --git a/java-chassis-samples/trust-sample/hacker/src/main/resources/log4j2.xml b/java-chassis-samples/trust-sample/hacker/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9a4ae20
--- /dev/null
+++ b/java-chassis-samples/trust-sample/hacker/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/hacker-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/trust-sample/hacker/src/main/resources/microservice.yaml b/java-chassis-samples/trust-sample/hacker/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..ec33b21
--- /dev/null
+++ b/java-chassis-samples/trust-sample/hacker/src/main/resources/microservice.yaml
@@ -0,0 +1,37 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: trust-sample
+service_description:
+  name: hacker
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  isolation:
+    Consumer:
+      enabled: false
+  references:
+    hello:
+      version-rule: 0.0.1
+  handler:
+    chain:
+      Consumer:
+        default: loadbalance,auth-consumer
+      Provider:
+        default: auth-provider
diff --git a/java-chassis-samples/trust-sample/pom.xml b/java-chassis-samples/trust-sample/pom.xml
new file mode 100644
index 0000000..e8bb4e4
--- /dev/null
+++ b/java-chassis-samples/trust-sample/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>samples</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>trust-sample</artifactId>
+  <packaging>pom</packaging>
+  <modules>
+    <module>store</module>
+    <module>customer</module>
+    <module>hacker</module>
+  </modules>
+</project>
diff --git a/java-chassis-samples/trust-sample/store/pom.xml b/java-chassis-samples/trust-sample/store/pom.xml
new file mode 100644
index 0000000..f22e4fd
--- /dev/null
+++ b/java-chassis-samples/trust-sample/store/pom.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<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>
+  <parent>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <artifactId>trust-sample</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>store</artifactId>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-bizkeeper</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-publickey-auth</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-loadbalance</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>handler-flowcontrol-qps</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <!--log4j2-->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb.samples</groupId>
+      <artifactId>common-schema</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/Compute.java b/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/Compute.java
new file mode 100644
index 0000000..b9557b2
--- /dev/null
+++ b/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/Compute.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.samples.trust;
+
+public interface Compute {
+
+  int add(int a, int b);
+
+  int multi(int a, int b);
+
+  int sub(int a, int b);
+
+  int divide(int a, int b);
+}
diff --git a/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/provider/CodeFirstComputeImpl.java b/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/provider/CodeFirstComputeImpl.java
new file mode 100644
index 0000000..9c21237
--- /dev/null
+++ b/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/provider/CodeFirstComputeImpl.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.trust.provider;
+
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+import org.apache.servicecomb.samples.trust.Compute;
+
+@RpcSchema(schemaId = "codeFirstCompute")
+public class CodeFirstComputeImpl implements Compute {
+  @Override
+  public int add(int a, int b) {
+    return a + b;
+  }
+
+  @Override
+  public int multi(int a, int b) {
+    return a * b;
+  }
+
+  @Override
+  public int sub(int a, int b) {
+    return a - b;
+  }
+
+  @Override
+  public int divide(int a, int b) {
+    if (b != 0) {
+      return a / b;
+    }
+    return 0;
+  }
+}
diff --git a/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/provider/TrustMain.java b/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/provider/TrustMain.java
new file mode 100644
index 0000000..66bca9f
--- /dev/null
+++ b/java-chassis-samples/trust-sample/store/src/main/java/org/apache/servicecomb/samples/trust/provider/TrustMain.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.trust.provider;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class TrustMain {
+
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
diff --git a/java-chassis-samples/trust-sample/store/src/main/resources/log4j2.xml b/java-chassis-samples/trust-sample/store/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..63333c1
--- /dev/null
+++ b/java-chassis-samples/trust-sample/store/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/store-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/trust-sample/store/src/main/resources/microservice.yaml b/java-chassis-samples/trust-sample/store/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..4358d42
--- /dev/null
+++ b/java-chassis-samples/trust-sample/store/src/main/resources/microservice.yaml
@@ -0,0 +1,48 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: trust-sample
+service_description:
+  name: store
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
+  highway:
+    address: 0.0.0.0:7070
+  handler:
+    chain:
+      Consumer:
+        default: loadbalance,auth-consumer
+      Provider:
+        default: auth-provider
+  publicKey:
+    accessControl:
+      black:
+        list01:
+          category: property ## property, fixed value
+          propertyName: serviceName ## property name, e.g. serviceName, appId, environment, alias, version and so on, also support key in properties.
+          rule: hacker ## property value match expression. 
+##if propertyName is serviceName, only supports prefix match and postfix match and exactly match. e.g. hacker*, *hacker, hacker
+      white:
+        list02:
+          category: property
+          propertyName: serviceName
+          rule: cust*
\ No newline at end of file
diff --git a/java-chassis-samples/use-log4j2-sample/pom.xml b/java-chassis-samples/use-log4j2-sample/pom.xml
new file mode 100644
index 0000000..c1dd078
--- /dev/null
+++ b/java-chassis-samples/use-log4j2-sample/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<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>samples</artifactId>
+    <groupId>org.apache.servicecomb.samples</groupId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>use-log4j2-sample</artifactId>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    <java.version>1.8</java.version>
+    <java-chassis.version>${project.version}</java-chassis.version>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.servicecomb</groupId>
+        <artifactId>java-chassis-dependencies</artifactId>
+        <version>${java-chassis.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-rest-vertx</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>transport-highway</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>provider-pojo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java b/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java
new file mode 100644
index 0000000..af2e674
--- /dev/null
+++ b/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Application.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.uselog4j2;
+
+import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+
+public class Application {
+  public static void main(String[] args) {
+    BeanUtils.init();
+  }
+}
\ No newline at end of file
diff --git a/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Hello.java b/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Hello.java
new file mode 100644
index 0000000..5b35784
--- /dev/null
+++ b/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/Hello.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.uselog4j2;
+
+public interface Hello {
+  String hello();
+}
\ No newline at end of file
diff --git a/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/HelloImpl.java b/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/HelloImpl.java
new file mode 100644
index 0000000..1c9d9e4
--- /dev/null
+++ b/java-chassis-samples/use-log4j2-sample/src/main/java/org/apache/servicecomb/samples/uselog4j2/HelloImpl.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.samples.uselog4j2;
+
+import org.apache.servicecomb.provider.pojo.RpcSchema;
+
+@RpcSchema(schemaId = "hello")
+public class HelloImpl implements Hello {
+
+  public String hello() {
+    return "Hello World!";
+  }
+}
\ No newline at end of file
diff --git a/java-chassis-samples/use-log4j2-sample/src/main/resources/log4j2.xml b/java-chassis-samples/use-log4j2-sample/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..6e9a8e4
--- /dev/null
+++ b/java-chassis-samples/use-log4j2-sample/src/main/resources/log4j2.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!--this is sample configuration, please modify as your wish-->
+<configuration>
+  <Properties>
+    <Property name="log_path">./target/log/</Property>
+  </Properties>
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+    </Console>
+    <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${log_path}/output.log"
+      filePattern="${log_path}/log4j2Sample-%d{yyyy-MM-dd}-%i.log">
+      <PatternLayout pattern="[%d][%p][%t][%F][%marker]%m %l%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="200 MB"/>
+      </Policies>
+      <DefaultRolloverStrategy max="99"/>
+    </RollingRandomAccessFile>
+  </Appenders>
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+      <AppenderRef ref="RollingRandomAccessFile"/>
+    </Root>
+  </Loggers>
+</configuration>
\ No newline at end of file
diff --git a/java-chassis-samples/use-log4j2-sample/src/main/resources/microservice.yaml b/java-chassis-samples/use-log4j2-sample/src/main/resources/microservice.yaml
new file mode 100644
index 0000000..3147b3e
--- /dev/null
+++ b/java-chassis-samples/use-log4j2-sample/src/main/resources/microservice.yaml
@@ -0,0 +1,28 @@
+#
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+APPLICATION_ID: samples
+service_description:
+  name: uselog4j2
+  version: 0.0.1
+servicecomb:
+  service:
+    registry:
+      address: http://127.0.0.1:30100
+  rest:
+    address: 0.0.0.0:8080
\ No newline at end of file