You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by il...@apache.org on 2019/07/29 06:14:10 UTC
[dubbo-samples] branch master updated: protostuff samples
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git
The following commit(s) were added to refs/heads/master by this push:
new 56a62af protostuff samples
56a62af is described below
commit 56a62af5f6aa2945e7edc6767baef9ae97627c12
Author: Ian Luo <ia...@gmail.com>
AuthorDate: Mon Jul 29 14:11:27 2019 +0800
protostuff samples
---
.../dubbo-samples-protostuff-api/pom.xml | 30 +++
.../dubbo/samples/protostuff/api/IUserService.java | 25 +++
.../dubbo/samples/protostuff/domain/UserInfo.java | 46 ++++
.../dubbo-samples-protostuff-consumer/pom.xml | 86 ++++++++
.../samples/protostuff/consumer/ConsumerApp.java | 29 +++
.../consumer/controller/UserController.java | 40 ++++
.../src/main/resources/application.yml | 7 +-
.../src/main/resources/logback.xml | 61 ++++++
.../dubbo-samples-protostuff-provider/pom.xml | 231 +++++++++++++++++++++
.../samples/protostuff/provider/ProviderApp.java | 30 +++
.../protostuff/provider/service/UserService.java | 38 ++++
.../src/main/resources/application.yml | 9 +-
.../src/main/resources/logback.xml | 46 ++++
.../samples/protostuff/consumer/ConsumerBean.java | 34 +++
.../protostuff/consumer/ConsumerConfig.java | 49 +++++
.../samples/protostuff/consumer/UserServiceIT.java | 40 ++++
dubbo-samples-protostuff/pom.xml | 158 ++++++++++++++
.../dubbo-samples-protosubff-api/pom.xml | 62 ------
.../dubbo/samples/protosubff/api/IUserService.java | 8 -
.../dubbo/samples/protosubff/domain/UserInfo.java | 31 ---
.../samples/protosubff/patch/ProtosubffPatch.java | 94 ---------
.../dubbo-samples-protosubff-consumer/pom.xml | 119 -----------
.../samples/protosubff/consumer/ConsumerApp.java | 15 --
.../consumer/controller/UserController.java | 22 --
.../src/main/resources/logback.xml | 50 -----
.../dubbo-samples-protosubff-provider/pom.xml | 114 ----------
.../samples/protosubff/provider/ProviderApp.java | 16 --
.../protosubff/provider/service/UserService.java | 25 ---
.../src/main/resources/logback.xml | 50 -----
dubbo-samples-protosubff/pom.xml | 152 --------------
pom.xml | 2 +-
31 files changed, 951 insertions(+), 768 deletions(-)
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-api/pom.xml b/dubbo-samples-protostuff/dubbo-samples-protostuff-api/pom.xml
new file mode 100644
index 0000000..b2d95cf
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-api/pom.xml
@@ -0,0 +1,30 @@
+<?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.dubbo</groupId>
+ <artifactId>dubbo-samples-protostuff</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>dubbo-samples-protostuff-api</artifactId>
+ <name>dubbo-samples-protostuff-api</name>
+</project>
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-api/src/main/java/org/dubbo/samples/protostuff/api/IUserService.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-api/src/main/java/org/dubbo/samples/protostuff/api/IUserService.java
new file mode 100644
index 0000000..f3b5c7f
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-api/src/main/java/org/dubbo/samples/protostuff/api/IUserService.java
@@ -0,0 +1,25 @@
+/*
+ * 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.dubbo.samples.protostuff.api;
+
+import org.dubbo.samples.protostuff.domain.UserInfo;
+
+public interface IUserService {
+
+ UserInfo insertUserInfo(String name);
+}
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-api/src/main/java/org/dubbo/samples/protostuff/domain/UserInfo.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-api/src/main/java/org/dubbo/samples/protostuff/domain/UserInfo.java
new file mode 100644
index 0000000..8e4c9fa
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-api/src/main/java/org/dubbo/samples/protostuff/domain/UserInfo.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.dubbo.samples.protostuff.domain;
+
+public class UserInfo {
+
+ private String uuid;
+
+ private String name;
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return "UserInfo [uuid=" + uuid + ", name=" + name + "]";
+ }
+}
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/pom.xml b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/pom.xml
new file mode 100644
index 0000000..50d39af
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/pom.xml
@@ -0,0 +1,86 @@
+<?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.dubbo</groupId>
+ <artifactId>dubbo-samples-protostuff</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>dubbo-samples-protostuff-consumer</artifactId>
+ <name>dubbo-samples-protostuff-consumer</name>
+ <url>http://maven.apache.org</url>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-samples-protostuff-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-starter</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-zookeeper</artifactId>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>io.protostuff</groupId>
+ <artifactId>protostuff-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>io.protostuff</groupId>
+ <artifactId>protostuff-runtime</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/java/org/dubbo/samples/protostuff/consumer/ConsumerApp.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/java/org/dubbo/samples/protostuff/consumer/ConsumerApp.java
new file mode 100644
index 0000000..3d2bff0
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/java/org/dubbo/samples/protostuff/consumer/ConsumerApp.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.dubbo.samples.protostuff.consumer;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ConsumerApp {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ConsumerApp.class, args);
+ }
+}
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/java/org/dubbo/samples/protostuff/consumer/controller/UserController.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/java/org/dubbo/samples/protostuff/consumer/controller/UserController.java
new file mode 100644
index 0000000..7f7e44f
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/java/org/dubbo/samples/protostuff/consumer/controller/UserController.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.dubbo.samples.protostuff.consumer.controller;
+
+import org.apache.dubbo.config.annotation.Reference;
+
+import org.dubbo.samples.protostuff.api.IUserService;
+import org.dubbo.samples.protostuff.domain.UserInfo;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+public class UserController {
+
+ @Reference(check = false)
+ private IUserService userService;
+
+ @RequestMapping(value = "/test")
+ @ResponseBody
+ public String insertUserInfo(String name) {
+ UserInfo userInfo = userService.insertUserInfo(name);
+ return userInfo.toString();
+ }
+}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/resources/application.yml b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/resources/application.yml
similarity index 61%
rename from dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/resources/application.yml
rename to dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/resources/application.yml
index 6c6b362..e6ea2f5 100644
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/resources/application.yml
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/resources/application.yml
@@ -9,12 +9,11 @@ logging:
dubbo:
application:
compiler: javassist
- name: org-dubbo-samples-protosubff-consumer
+ name: protostuff-demo-consumer
scan:
- base-packages: org.dubbo.samples.protosubff.consumer
+ base-packages: org.dubbo.samples.protostuff.consumer
registry:
- address: 127.0.0.1:2181
+ address: ${zookeeper.address:127.0.0.1}:2181
protocol: zookeeper
port: 2181
dynamic: true
-
\ No newline at end of file
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/resources/logback.xml b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/resources/logback.xml
new file mode 100644
index 0000000..fa18922
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-consumer/src/main/resources/logback.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.
+ -->
+
+<configuration>
+
+ <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+ <appender name="file"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <File>test.log</File>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <FileNamePattern>test-%d{yyyy-MM-dd}.%i.log
+ </FileNamePattern>
+ <MaxHistory>10</MaxHistory>
+ <TimeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <MaxFileSize>5MB</MaxFileSize>
+ </TimeBasedFileNamingAndTriggeringPolicy>
+ </rollingPolicy>
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
+ </pattern>
+ </layout>
+ </appender>
+
+ <root>
+ <level value="error"/>
+ <level value="info"/>
+ <!-- <appender-ref ref="file" /> -->
+ <appender-ref ref="console"/>
+ </root>
+
+ <logger name="org.apache.dubbo" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="console"/>
+ </logger>
+
+ <logger name="org.dubbo.samples.protostuff.consumer" level="DEBUG" additivity="false">
+ <appender-ref ref="console"/>
+ </logger>
+</configuration>
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/pom.xml b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/pom.xml
new file mode 100644
index 0000000..02a54eb
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/pom.xml
@@ -0,0 +1,231 @@
+<?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.dubbo</groupId>
+ <artifactId>dubbo-samples-protostuff</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>dubbo-samples-protostuff-provider</artifactId>
+ <name>dubbo-samples-protostuff-provider</name>
+
+ <properties>
+ <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
+ <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
+ <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
+ <image.name>${artifactId}:${dubbo.version}</image.name>
+ <java-image.name>openjdk:8</java-image.name>
+ <dubbo.port>20880</dubbo.port>
+ <zookeeper.port>2181</zookeeper.port>
+ <main-class>org.dubbo.samples.protostuff.provider.ProviderApp</main-class>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-samples-protostuff-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-starter</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-zookeeper</artifactId>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>io.protostuff</groupId>
+ <artifactId>protostuff-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>io.protostuff</groupId>
+ <artifactId>protostuff-runtime</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>dubbo-integration-test</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-maven-address-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>local-address</goal>
+ </goals>
+ <configuration>
+ <localAddress>dubbo-local-address</localAddress>
+ </configuration>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-maven-plugin</artifactId>
+ <version>${jib-maven-plugin.version}</version>
+ <configuration>
+ <from>
+ <image>${java-image.name}</image>
+ </from>
+ <to>
+ <image>${image.name}</image>
+ </to>
+ <container>
+ <mainClass>${main-class}</mainClass>
+ <environment>
+ <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
+ </environment>
+ <jvmFlags>
+ <jvmFlag>-Dzookeeper.address=${dubbo-local-address}</jvmFlag>
+ </jvmFlags>
+ </container>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>dockerBuild</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin.version}</version>
+ <configuration>
+ <images>
+ <image>
+ <name>zookeeper:latest</name>
+ <run>
+ <ports>
+ <port>${zookeeper.port}:${zookeeper.port}</port>
+ </ports>
+ <wait>
+ <tcp>
+ <host>${dubbo-local-address}</host>
+ <ports>
+ <port>${zookeeper.port}</port>
+ </ports>
+ </tcp>
+ </wait>
+ </run>
+ </image>
+ <image>
+ <name>${image.name}</name>
+ <run>
+ <ports>
+ <port>${dubbo.port}:${dubbo.port}</port>
+ </ports>
+ <wait>
+ <time>20000</time>
+ <log>Spring Boot Application is await</log>
+ </wait>
+ </run>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${maven-failsafe-plugin.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <systemPropertyVariables>
+ <zookeeper.address>${dubbo-local-address}</zookeeper.address>
+ </systemPropertyVariables>
+ <includes>
+ <include>**/*IT.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/java/org/dubbo/samples/protostuff/provider/ProviderApp.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/java/org/dubbo/samples/protostuff/provider/ProviderApp.java
new file mode 100644
index 0000000..bbc6beb
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/java/org/dubbo/samples/protostuff/provider/ProviderApp.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.dubbo.samples.protostuff.provider;
+
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+
+@SpringBootApplication
+public class ProviderApp {
+
+ public static void main(String[] args) {
+ new SpringApplicationBuilder(ProviderApp.class).web(WebApplicationType.NONE).run(args);
+ }
+}
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/java/org/dubbo/samples/protostuff/provider/service/UserService.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/java/org/dubbo/samples/protostuff/provider/service/UserService.java
new file mode 100644
index 0000000..5f0bf05
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/java/org/dubbo/samples/protostuff/provider/service/UserService.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.dubbo.samples.protostuff.provider.service;
+
+import org.apache.dubbo.config.annotation.Service;
+
+import org.dubbo.samples.protostuff.api.IUserService;
+import org.dubbo.samples.protostuff.domain.UserInfo;
+
+import java.util.UUID;
+
+@Service(protocol = "dubbo", dynamic = true)
+public class UserService implements IUserService {
+
+ @Override
+ public UserInfo insertUserInfo(String name) {
+ UserInfo userInfo = new UserInfo();
+ userInfo.setName(name);
+ userInfo.setUuid(UUID.randomUUID().toString());
+ return userInfo;
+ }
+
+}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/resources/application.yml b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/resources/application.yml
similarity index 69%
rename from dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/resources/application.yml
rename to dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/resources/application.yml
index be2cf2f..6189f50 100644
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/resources/application.yml
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/resources/application.yml
@@ -4,11 +4,11 @@ logging:
dubbo:
application:
compiler: javassist
- name: org-dubbo-samples-protosubff-provider
+ name: protostuff-demo-provider
scan:
- base-packages: org.dubbo.samples.protosubff.provider
+ base-packages: org.dubbo.samples.protostuff.provider
registry:
- address: 127.0.0.1:2181
+ address: ${zookeeper.address:127.0.0.1}:2181
protocol: zookeeper
port: 2181
dynamic: true
@@ -20,5 +20,4 @@ dubbo:
#serialization: fastjson
server: netty4
register: true
-
-
\ No newline at end of file
+
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/resources/logback.xml b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/resources/logback.xml
new file mode 100644
index 0000000..4560ff4
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/main/resources/logback.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+ <appender name="file"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <File>test.log</File>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <FileNamePattern>test-%d{yyyy-MM-dd}.%i.log
+ </FileNamePattern>
+ <MaxHistory>10</MaxHistory>
+ <TimeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <MaxFileSize>5MB</MaxFileSize>
+ </TimeBasedFileNamingAndTriggeringPolicy>
+ </rollingPolicy>
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
+ </pattern>
+ </layout>
+ </appender>
+
+ <root>
+ <level value="error"/>
+ <level value="info"/>
+ <!-- <appender-ref ref="file" /> -->
+ <appender-ref ref="console"/>
+ </root>
+
+ <logger name="org.apache.dubbo" additivity="false">
+ <level value="debug"/>
+ <appender-ref ref="console"/>
+ </logger>
+
+ <logger name="org.dubbo.samples.protostuff.provider" level="DEBUG" additivity="false">
+ <appender-ref ref="console"/>
+ </logger>
+
+
+</configuration>
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/ConsumerBean.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/ConsumerBean.java
new file mode 100644
index 0000000..a9b449a
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/ConsumerBean.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.dubbo.samples.protostuff.consumer;
+
+import org.apache.dubbo.config.annotation.Reference;
+
+import org.dubbo.samples.protostuff.api.IUserService;
+import org.dubbo.samples.protostuff.domain.UserInfo;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ConsumerBean {
+ @Reference
+ private IUserService userService;
+
+ public UserInfo insertUserInfo(String name) {
+ return userService.insertUserInfo(name);
+ }
+}
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/ConsumerConfig.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/ConsumerConfig.java
new file mode 100644
index 0000000..8bfdd05
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/ConsumerConfig.java
@@ -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.
+ */
+
+package org.dubbo.samples.protostuff.consumer;
+
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@EnableDubbo(scanBasePackages = "org.dubbo.samples.protostuff.consumer")
+@ComponentScan(value = {"org.dubbo.samples.protostuff.consumer"})
+public class ConsumerConfig {
+ @Value("zookeeper://${zookeeper.address:127.0.0.1}:2181")
+ private String zookeeperAddress;
+
+ @Bean
+ public ApplicationConfig applicationConfig() {
+ ApplicationConfig applicationConfig = new ApplicationConfig();
+ applicationConfig.setName("protostuff-demo-consumer");
+ return applicationConfig;
+ }
+
+ @Bean
+ public RegistryConfig registryConfig() {
+ RegistryConfig registryConfig = new RegistryConfig();
+ registryConfig.setAddress(zookeeperAddress);
+ return registryConfig;
+ }
+}
diff --git a/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/UserServiceIT.java b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/UserServiceIT.java
new file mode 100644
index 0000000..a893eec
--- /dev/null
+++ b/dubbo-samples-protostuff/dubbo-samples-protostuff-provider/src/test/java/org/dubbo/samples/protostuff/consumer/UserServiceIT.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.dubbo.samples.protostuff.consumer;
+
+import junit.framework.TestCase;
+import org.dubbo.samples.protostuff.domain.UserInfo;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {ConsumerConfig.class})
+public class UserServiceIT {
+ @Autowired
+ private ConsumerBean consumer;
+
+ @Test
+ public void test() {
+ UserInfo userInfo = consumer.insertUserInfo("dubbo");
+ TestCase.assertEquals("dubbo", userInfo.getName());
+ TestCase.assertNotNull(userInfo.getUuid());
+ }
+}
diff --git a/dubbo-samples-protostuff/pom.xml b/dubbo-samples-protostuff/pom.xml
new file mode 100644
index 0000000..6849539
--- /dev/null
+++ b/dubbo-samples-protostuff/pom.xml
@@ -0,0 +1,158 @@
+<?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.dubbo</groupId>
+ <artifactId>dubbo-samples-all</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>dubbo-samples-protostuff</artifactId>
+ <name>dubbo-samples-protostuff</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <source.level>1.8</source.level>
+ <target.level>1.8</target.level>
+ <spring-boot.version>2.1.1.RELEASE</spring-boot.version>
+ <dubbo.version>2.7.4-SNAPSHOT</dubbo.version>
+ <protostuff.version>1.5.9</protostuff.version>
+ <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
+ <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
+ <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
+ <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
+ <image.name>${artifactId}:${dubbo.version}</image.name>
+ <java-image.name>openjdk:8</java-image.name>
+ <dubbo.port>20880</dubbo.port>
+ <zookeeper.port>2181</zookeeper.port>
+ <main-class>org.apache.dubbo.samples.annotation.AnnotationProviderBootstrap</main-class>
+ </properties>
+
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- Spring Boot -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-dependencies</artifactId>
+ <version>${spring-boot.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <!-- Aapche Dubbo -->
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-bom</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-spring-boot-starter</artifactId>
+ <version>2.7.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <version>${dubbo.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>net.logstash.logback</groupId>
+ <artifactId>logstash-logback-encoder</artifactId>
+ <version>4.7</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ <exclusions>
+ <exclusion>
+ <artifactId>log4j</artifactId>
+ <groupId>log4j</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>io.protostuff</groupId>
+ <artifactId>protostuff-core</artifactId>
+ <version>${protostuff.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.protostuff</groupId>
+ <artifactId>protostuff-runtime</artifactId>
+ <version>${protostuff.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.alibaba</groupId>
+ <artifactId>fastjson</artifactId>
+ <version>1.2.46</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>dubbo-samples-protostuff-api</module>
+ <module>dubbo-samples-protostuff-provider</module>
+ <module>dubbo-samples-protostuff-consumer</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven-compiler-plugin.version}</version>
+ <configuration>
+ <source>${source.level}</source>
+ <target>${target.level}</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/pom.xml b/dubbo-samples-protosubff/dubbo-samples-protosubff-api/pom.xml
deleted file mode 100644
index 63a4516..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/pom.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?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.dubbo</groupId>
- <artifactId>dubbo-samples-protosubff</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>dubbo-samples-protosubff-api</artifactId>
- <name>dubbo-samples-protosubff-api</name>
- <url>http://maven.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven_compiler_version}</version>
- <configuration>
- <source>${java_source_version}</source>
- <target>${java_target_version}</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/api/IUserService.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/api/IUserService.java
deleted file mode 100644
index 861139f..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/api/IUserService.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.dubbo.samples.protosubff.api;
-
-import org.dubbo.samples.protosubff.domain.UserInfo;
-
-public interface IUserService {
-
- UserInfo insertUserInfo(String name);
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/domain/UserInfo.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/domain/UserInfo.java
deleted file mode 100644
index 167c1ea..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/domain/UserInfo.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.dubbo.samples.protosubff.domain;
-
-public class UserInfo {
-
- private String uuid;
-
- private String name;
-
- public String getUuid() {
- return uuid;
- }
-
- public void setUuid(String uuid) {
- this.uuid = uuid;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return "UserInfo [uuid=" + uuid + ", name=" + name + "]";
- }
-
-
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/patch/ProtosubffPatch.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/patch/ProtosubffPatch.java
deleted file mode 100644
index 0ff3db7..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-api/src/main/java/org/dubbo/samples/protosubff/patch/ProtosubffPatch.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.dubbo.samples.protosubff.patch;
-
-
-import org.apache.dubbo.common.serialize.ObjectInput;
-import org.apache.dubbo.common.serialize.ObjectOutput;
-import org.apache.dubbo.common.utils.ClassHelper;
-import org.apache.dubbo.remoting.Channel;
-
-import javassist.ClassPool;
-import javassist.CtClass;
-import javassist.CtMethod;
-import javassist.LoaderClassPath;
-
-/**
- * 一个临时解决的办法
- * 主要描述了问题的产生
- * 环境
- * dubbo 2.7.1
- * protocol 使用 dubbo 序列化设置为 protosubff
- * 别的为默认
- *
- */
-public class ProtosubffPatch {
-
- /**
- * 这里简单的做了处理
- *
- * 问题描述
- * 当使用 protosubff序列化时
- * NettyClientHandler.userEventTriggered 发送心跳时
- Request req = new Request();
- req.setVersion(Version.getProtocolVersion());
- req.setTwoWay(true);
- req.setEvent(Request.HEARTBEAT_EVENT);
- --->没有 setData
- ========================================================================================================================
- * 编码时候
- * 抛出java.lang.NullPointerException
- * 原因:
- * ExchangeCodec.encodeEventData
- * -->out.writeObject(data); // data=null
- * WrapperUtils.needWrapper(obj) // obj=null
- * public static boolean needWrapper(Object obj) {
- return needWrapper(obj.getClass()); //--->java.lang.NullPointerException
- }
- ==============================================================================================================================
- * 解码时候
- * 抛出一场
- * java.io.EOFException: null
- * java.io.DataInputStream.readInt(DataInputStream.java:392)
- * 原因
- * DubboCodec.decodeBody -->122行
- * if (req.isHeartbeat()) {
- data = decodeHeartbeatData(channel, in);
- }
- Request.isHeartbeat() //表示是一个心跳
- public boolean isHeartbeat() {
- return mEvent && HEARTBEAT_EVENT == mData; //-->HEARTBEAT_EVENT=null
- }
- 所以
- protected Object decodeHeartbeatData(Channel channel, ObjectInput in) throws IOException {
- try {
- return in.readObject(); // ---->这里 java.io.EOFException: null
- } catch (ClassNotFoundException e) {
- throw new IOException(StringUtils.toString("Read object failed.", e));
- }
- }
- */
- public static void patch(){
- try{
- ClassPool classPool = ClassPool.getDefault();
- classPool.appendClassPath(new LoaderClassPath(ClassHelper.getClassLoader()));
- CtClass ctClass = classPool.getCtClass("org.apache.dubbo.remoting.exchange.codec.ExchangeCodec");
- CtClass[] paramTypes = {classPool.get(ObjectOutput.class.getName()),classPool.get(Object.class.getName())};
- CtMethod m = ctClass.getDeclaredMethod("encodeEventData",paramTypes);
- m.setBody("{"
- + "if($2!=null){"
- + "$1.writeObject($2);"
- + "}else{"
- + "logger.debug(\"temp patch data is null\");"
- + "}"
- + "}");
- CtClass[] paramTypes2 = {classPool.get(Channel.class.getName()),classPool.get(ObjectInput.class.getName())};
- CtMethod m2 = ctClass.getDeclaredMethod("decodeHeartbeatData",paramTypes2);
- m2.setBody("{"
- + "logger.debug(\"temp patch heartbeatData is null\");"
- + "return null;"
- + "}");
- ctClass.toClass(ClassHelper.getClassLoader(), ctClass.getClass().getProtectionDomain());
- }catch(Exception e){
- e.printStackTrace();
- }
- }
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/pom.xml b/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/pom.xml
deleted file mode 100644
index 640598e..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?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.dubbo</groupId>
- <artifactId>dubbo-samples-protosubff</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>dubbo-samples-protosubff-consumer</artifactId>
- <name>dubbo-samples-protosubff-consumer</name>
- <url>http://maven.apache.org</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-protosubff-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>io.protostuff</groupId>
- <artifactId>protostuff-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>io.protostuff</groupId>
- <artifactId>protostuff-runtime</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven_compiler_version}</version>
- <configuration>
- <source>${java_source_version}</source>
- <target>${java_target_version}</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/java/org/dubbo/samples/protosubff/consumer/ConsumerApp.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/java/org/dubbo/samples/protosubff/consumer/ConsumerApp.java
deleted file mode 100644
index 9d68054..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/java/org/dubbo/samples/protosubff/consumer/ConsumerApp.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.dubbo.samples.protosubff.consumer;
-
-import org.dubbo.samples.protosubff.patch.ProtosubffPatch;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class ConsumerApp {
-
- public static void main(String[] args) {
- // 使用 protosubff时候 会出现心跳 问题 这是个小的解决方案
- ProtosubffPatch.patch();
- SpringApplication.run(ConsumerApp.class, args);
- }
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/java/org/dubbo/samples/protosubff/consumer/controller/UserController.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/java/org/dubbo/samples/protosubff/consumer/controller/UserController.java
deleted file mode 100644
index b40c1ba..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/java/org/dubbo/samples/protosubff/consumer/controller/UserController.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.dubbo.samples.protosubff.consumer.controller;
-
-import org.apache.dubbo.config.annotation.Reference;
-import org.dubbo.samples.protosubff.api.IUserService;
-import org.dubbo.samples.protosubff.domain.UserInfo;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-@Controller
-public class UserController {
-
- @Reference(check=false)
- private IUserService userService;
-
- @RequestMapping(value = "/test")
- @ResponseBody
- public String insertUserInfo(String name){
- UserInfo userInfo = userService.insertUserInfo(name);
- return userInfo.toString();
- }
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/resources/logback.xml b/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/resources/logback.xml
deleted file mode 100644
index f745814..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-consumer/src/main/resources/logback.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-
- <!-- ch.qos.logback.core.ConsoleAppender 控制台输出 -->
- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
- </pattern>
- </encoder>
- </appender>
-
- <!-- ch.qos.logback.core.rolling.RollingFileAppender 文件日志输出 -->
- <appender name="file"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>test.log</File>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>test-%d{yyyy-MM-dd}.%i.log
- </FileNamePattern>
- <MaxHistory>10</MaxHistory>
- <TimeBasedFileNamingAndTriggeringPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <MaxFileSize>5MB</MaxFileSize>
- </TimeBasedFileNamingAndTriggeringPolicy>
- </rollingPolicy>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
- </pattern>
- </layout>
- </appender>
-
- <!-- 日志级别 -->
- <root>
- <!-- 定义了ERROR和INFO级别的日志,分别在FILE文件和控制台输出 -->
- <level value="error" />
- <level value="info" />
- <!-- <appender-ref ref="file" /> -->
- <appender-ref ref="console" />
- </root>
-
- <logger name="org.apache.dubbo" additivity="false">
- <level value="debug" />
- <appender-ref ref="console" />
- </logger>
-
- <logger name="org.dubbo.samples.protosubff.consumer" level="DEBUG" additivity="false">
- <appender-ref ref="console"/>
- </logger>
-
-
-</configuration>
\ No newline at end of file
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/pom.xml b/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/pom.xml
deleted file mode 100644
index 746630e..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/pom.xml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?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.dubbo</groupId>
- <artifactId>dubbo-samples-protosubff</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>dubbo-samples-protosubff-provider</artifactId>
- <name>dubbo-samples-protosubff-provider</name>
- <url>http://maven.apache.org</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-protosubff-api</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper</artifactId>
- <type>pom</type>
- </dependency>
-
- <dependency>
- <groupId>io.protostuff</groupId>
- <artifactId>protostuff-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>io.protostuff</groupId>
- <artifactId>protostuff-runtime</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven_compiler_version}</version>
- <configuration>
- <source>${java_source_version}</source>
- <target>${java_target_version}</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/java/org/dubbo/samples/protosubff/provider/ProviderApp.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/java/org/dubbo/samples/protosubff/provider/ProviderApp.java
deleted file mode 100644
index 2a02f41..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/java/org/dubbo/samples/protosubff/provider/ProviderApp.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.dubbo.samples.protosubff.provider;
-
-import org.dubbo.samples.protosubff.patch.ProtosubffPatch;
-import org.springframework.boot.WebApplicationType;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-
-@EnableAutoConfiguration
-public class ProviderApp {
-
- public static void main(String[] args) {
- // 使用 protosubff时候 会出现心跳 问题 这是个小的解决方案
- ProtosubffPatch.patch();
- new SpringApplicationBuilder(ProviderApp.class).web(WebApplicationType.NONE).run(args);
- }
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/java/org/dubbo/samples/protosubff/provider/service/UserService.java b/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/java/org/dubbo/samples/protosubff/provider/service/UserService.java
deleted file mode 100644
index 2a1dcb1..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/java/org/dubbo/samples/protosubff/provider/service/UserService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.dubbo.samples.protosubff.provider.service;
-
-import java.util.UUID;
-
-import org.apache.dubbo.config.annotation.Service;
-import org.dubbo.samples.protosubff.api.IUserService;
-import org.dubbo.samples.protosubff.domain.UserInfo;
-
-/**
- * 这里 dynamic 需要手动设置为true
- * 具体见 AbstractServiceConfig dynamic=false
- *
- */
-@Service(protocol="dubbo", dynamic=true)
-public class UserService implements IUserService{
-
- @Override
- public UserInfo insertUserInfo(String name) {
- UserInfo userInfo = new UserInfo();
- userInfo.setName(name);
- userInfo.setUuid(UUID.randomUUID().toString());
- return userInfo;
- }
-
-}
diff --git a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/resources/logback.xml b/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/resources/logback.xml
deleted file mode 100644
index d1ccec3..0000000
--- a/dubbo-samples-protosubff/dubbo-samples-protosubff-provider/src/main/resources/logback.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
-
- <!-- ch.qos.logback.core.ConsoleAppender 控制台输出 -->
- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
- </pattern>
- </encoder>
- </appender>
-
- <!-- ch.qos.logback.core.rolling.RollingFileAppender 文件日志输出 -->
- <appender name="file"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>test.log</File>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <FileNamePattern>test-%d{yyyy-MM-dd}.%i.log
- </FileNamePattern>
- <MaxHistory>10</MaxHistory>
- <TimeBasedFileNamingAndTriggeringPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <MaxFileSize>5MB</MaxFileSize>
- </TimeBasedFileNamingAndTriggeringPolicy>
- </rollingPolicy>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <pattern>[%-5level] %d{HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
- </pattern>
- </layout>
- </appender>
-
- <!-- 日志级别 -->
- <root>
- <!-- 定义了ERROR和INFO级别的日志,分别在FILE文件和控制台输出 -->
- <level value="error" />
- <level value="info" />
- <!-- <appender-ref ref="file" /> -->
- <appender-ref ref="console" />
- </root>
-
- <logger name="org.apache.dubbo" additivity="false">
- <level value="debug" />
- <appender-ref ref="console" />
- </logger>
-
- <logger name="org.dubbo.samples.protosubff.provider" level="DEBUG" additivity="false">
- <appender-ref ref="console"/>
- </logger>
-
-
-</configuration>
\ No newline at end of file
diff --git a/dubbo-samples-protosubff/pom.xml b/dubbo-samples-protosubff/pom.xml
deleted file mode 100644
index 9e36ef1..0000000
--- a/dubbo-samples-protosubff/pom.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?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.dubbo</groupId>
- <artifactId>dubbo-samples-all</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>dubbo-samples-protosubff</artifactId>
- <name>dubbo-samples-protosubff</name>
- <url>http://maven.apache.org</url>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <spring-boot.version>2.1.1.RELEASE</spring-boot.version>
- <dubbo.version>2.7.1</dubbo.version>
- <protostuff.version>1.5.9</protostuff.version>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- <maven_compiler_version>3.6.0</maven_compiler_version>
- <java_source_version>1.8</java_source_version>
- <java_target_version>1.8</java_target_version>
- </properties>
-
- <packaging>pom</packaging>
-
- <dependencyManagement>
- <dependencies>
- <!-- Spring Boot -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <!-- Aapche Dubbo -->
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-spring-boot-starter</artifactId>
- <version>2.7.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>net.logstash.logback</groupId>
- <artifactId>logstash-logback-encoder</artifactId>
- <version>4.7</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-dependencies-zookeeper</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <exclusions>
- <exclusion>
- <artifactId>log4j</artifactId>
- <groupId>log4j</groupId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>io.protostuff</groupId>
- <artifactId>protostuff-core</artifactId>
- <version>${protostuff.version}</version>
- </dependency>
-
- <dependency>
- <groupId>io.protostuff</groupId>
- <artifactId>protostuff-runtime</artifactId>
- <version>${protostuff.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>1.2.46</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <modules>
- <module>dubbo-samples-protosubff-api</module>
- <module>dubbo-samples-protosubff-provider</module>
- <module>dubbo-samples-protosubff-consumer</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven_compiler_version}</version>
- <configuration>
- <source>${java_source_version}</source>
- <target>${java_target_version}</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 9e3fbdc..a1c3d97 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
<module>dubbo-samples-nacos</module>
<module>dubbo-samples-metrics</module>
<module>dubbo-samples-environment-keys</module>
- <module>dubbo-samples-protosubff</module>
+ <module>dubbo-samples-protostuff</module>
<module>dubbo-samples-serialization</module>
<module>dubbo-samples-sentinel</module>
</modules>
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org