Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
touzizhuo03
Dubbo
提交
5207e33a
D
Dubbo
项目概览
touzizhuo03
/
Dubbo
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Dubbo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5207e33a
编写于
12月 06, 2017
作者:
Q
qinliujie
提交者:
ken.lj
12月 06, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merge pull request #1003, make demo to work and remove something useless
Fixed #998
上级
e51c52f1
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
22 addition
and
222 deletion
+22
-222
dubbo-demo/dubbo-demo-consumer/pom.xml
dubbo-demo/dubbo-demo-consumer/pom.xml
+0
-42
dubbo-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml
...o-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml
+0
-39
dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
...bbo-demo-consumer/src/main/assembly/conf/dubbo.properties
+0
-25
dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/Consumer.java
...c/main/java/com/alibaba/dubbo/demo/consumer/Consumer.java
+16
-5
dubbo-demo/dubbo-demo-consumer/src/main/resources/dubbo.properties
...o/dubbo-demo-consumer/src/main/resources/dubbo.properties
+1
-0
dubbo-demo/dubbo-demo-provider/pom.xml
dubbo-demo/dubbo-demo-provider/pom.xml
+0
-42
dubbo-demo/dubbo-demo-provider/src/main/assembly/assembly.xml
...o-demo/dubbo-demo-provider/src/main/assembly/assembly.xml
+0
-39
dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
...bbo-demo-provider/src/main/assembly/conf/dubbo.properties
+0
-28
dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/provider/Provider.java
...c/main/java/com/alibaba/dubbo/demo/provider/Provider.java
+4
-2
dubbo-demo/dubbo-demo-provider/src/main/resources/dubbo.properties
...o/dubbo-demo-provider/src/main/resources/dubbo.properties
+1
-0
未找到文件。
dubbo-demo/dubbo-demo-consumer/pom.xml
浏览文件 @
5207e33a
...
...
@@ -77,46 +77,4 @@
<artifactId>
slf4j-api
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-dependency-plugin
</artifactId>
<executions>
<execution>
<id>
unpack
</id>
<phase>
package
</phase>
<goals>
<goal>
unpack
</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>
com.alibaba
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
${project.parent.version}
</version>
<outputDirectory>
${project.build.directory}/dubbo
</outputDirectory>
<includes>
META-INF/assembly/**
</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<configuration>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</configuration>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
dubbo-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml
已删除
100644 → 0
浏览文件 @
e51c52f1
<!--
- Copyright 1999-2011 Alibaba Group.
-
- Licensed 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.
-->
<assembly>
<id>
assembly
</id>
<formats>
<format>
tar.gz
</format>
</formats>
<includeBaseDirectory>
true
</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>
${project.build.directory}/dubbo/META-INF/assembly/bin
</directory>
<outputDirectory>
bin
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/assembly/conf
</directory>
<outputDirectory>
conf
</outputDirectory>
<fileMode>
0644
</fileMode>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>
lib
</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>
\ No newline at end of file
dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
已删除
100644 → 0
浏览文件 @
e51c52f1
##
# Copyright 1999-2011 Alibaba Group.
#
# Licensed 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.
##
dubbo.container
=
log4j,spring
dubbo.application.name
=
demo-consumer
dubbo.application.owner
=
dubbo.registry.address=multicast://224.5.6.7:1234
#dubbo.registry.address=zookeeper://127.0.0.1:2181
#dubbo.registry.address=redis://127.0.0.1:6379
#dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.monitor.protocol
=
registry
dubbo.log4j.file
=
logs/dubbo-demo-consumer.log
dubbo.log4j.level
=
WARN
\ No newline at end of file
dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/Consumer.java
浏览文件 @
5207e33a
package
com.alibaba.dubbo.demo.consumer
;
import
com.alibaba.dubbo.demo.DemoService
;
import
org.springframework.context.support.ClassPathXmlApplicationContext
;
/**
...
...
@@ -10,13 +9,25 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
public
class
Consumer
{
public
static
void
main
(
String
[]
args
)
{
System
.
setProperty
(
"java.net.preferIPv4Stack"
,
"true"
);
//防止无线网络自动返回IPv6地址
//Prevent to get IPV6 address,this way only work in debug mode
//But you can pass use -Djava.net.preferIPv4Stack=true,then it work well whether in debug mode or not
System
.
setProperty
(
"java.net.preferIPv4Stack"
,
"true"
);
ClassPathXmlApplicationContext
context
=
new
ClassPathXmlApplicationContext
(
new
String
[]{
"META-INF/spring/dubbo-demo-consumer.xml"
});
context
.
start
();
DemoService
demoService
=
(
DemoService
)
context
.
getBean
(
"demoService"
);
// get remote service proxy
while
(
true
)
{
try
{
Thread
.
sleep
(
1000
);
String
hello
=
demoService
.
sayHello
(
"world"
);
// call remote method
System
.
out
.
println
(
hello
);
// get result
}
catch
(
Throwable
throwable
)
{
throwable
.
printStackTrace
();
}
DemoService
demoService
=
(
DemoService
)
context
.
getBean
(
"demoService"
);
// 获取远程服务代理
String
hello
=
demoService
.
sayHello
(
"world"
);
// 执行远程方法
}
System
.
out
.
println
(
hello
);
// 显示调用结果
}
}
dubbo-demo/dubbo-demo-consumer/src/main/resources/dubbo.properties
0 → 100644
浏览文件 @
5207e33a
dubbo.qos.port
=
33333
dubbo-demo/dubbo-demo-provider/pom.xml
浏览文件 @
5207e33a
...
...
@@ -77,46 +77,4 @@
<artifactId>
slf4j-api
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>
maven-dependency-plugin
</artifactId>
<executions>
<execution>
<id>
unpack
</id>
<phase>
package
</phase>
<goals>
<goal>
unpack
</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>
com.alibaba
</groupId>
<artifactId>
dubbo
</artifactId>
<version>
${project.parent.version}
</version>
<outputDirectory>
${project.build.directory}/dubbo
</outputDirectory>
<includes>
META-INF/assembly/**
</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<configuration>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</configuration>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
dubbo-demo/dubbo-demo-provider/src/main/assembly/assembly.xml
已删除
100644 → 0
浏览文件 @
e51c52f1
<!--
- Copyright 1999-2011 Alibaba Group.
-
- Licensed 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.
-->
<assembly>
<id>
assembly
</id>
<formats>
<format>
tar.gz
</format>
</formats>
<includeBaseDirectory>
true
</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>
${project.build.directory}/dubbo/META-INF/assembly/bin
</directory>
<outputDirectory>
bin
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/assembly/conf
</directory>
<outputDirectory>
conf
</outputDirectory>
<fileMode>
0644
</fileMode>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>
lib
</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>
\ No newline at end of file
dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
已删除
100644 → 0
浏览文件 @
e51c52f1
##
# Copyright 1999-2011 Alibaba Group.
#
# Licensed 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.
##
dubbo.container
=
log4j,spring
dubbo.application.name
=
demo-provider
dubbo.application.owner
=
dubbo.registry.address=multicast://224.5.6.7:1234
#dubbo.registry.address=zookeeper://127.0.0.1:2181
#dubbo.registry.address=redis://127.0.0.1:6379
#dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.monitor.protocol
=
registry
dubbo.protocol.name
=
dubbo
dubbo.protocol.port
=
20880
dubbo.service.loadbalance
=
roundrobin
dubbo.log4j.file
=
logs/dubbo-demo-provider.log
dubbo.log4j.level
=
WARN
\ No newline at end of file
dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/provider/Provider.java
浏览文件 @
5207e33a
...
...
@@ -8,11 +8,13 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
public
class
Provider
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
System
.
setProperty
(
"java.net.preferIPv4Stack"
,
"true"
);
//防止无线网络自动返回IPv6地址
//Prevent to get IPV6 address,this way only work in debug mode
//But you can pass use -Djava.net.preferIPv4Stack=true,then it work well whether in debug mode or not
System
.
setProperty
(
"java.net.preferIPv4Stack"
,
"true"
);
ClassPathXmlApplicationContext
context
=
new
ClassPathXmlApplicationContext
(
new
String
[]{
"META-INF/spring/dubbo-demo-provider.xml"
});
context
.
start
();
System
.
in
.
read
();
//
按任意键退出
System
.
in
.
read
();
//
press any key to exit
}
}
dubbo-demo/dubbo-demo-provider/src/main/resources/dubbo.properties
0 → 100644
浏览文件 @
5207e33a
dubbo.qos.port
=
22222
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录