Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-dubbo-demo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangjinjue
spring-boot-dubbo-demo
Commits
b228c6a2
Commit
b228c6a2
authored
Mar 13, 2018
by
yangjinjue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改readme
parent
aa56b08a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
README.md
+11
-14
No files found.
README.md
View file @
b228c6a2
...
...
@@ -29,30 +29,27 @@ spring.dubbo.module.default=false
```
### 1. 服务端介绍
### 2. 客户端介绍
*
配置文件
`application.properties`
```
spring.dubbo.application.name=
provid
er
spring.dubbo.application.name=
consum
er
spring.dubbo.registry.address=zookeeper://localhost:2181
spring.dubbo.protocol.name=dubbo
spring.dubbo.protocol.port=20879
spring.dubbo.protocol.host=localhost
spring.dubbo.scan=com.zhiwei.demo.server
spring.dubbo.scan=com.zhiwei.demo.client
spring.dubbo.module.default=false
```
`spring.dubbo.scan`
表示要扫描的
`package`
目录。
*
启动入口
`com.zhiwei.demo.
server.Server
`
*
启动入口
`com.zhiwei.demo.
client.Client
`
```
@SpringBootApplication
public class Server
{
private static Logger logger = LoggerFactory.getLogger(Server
.class);
public class Client
{
private static Logger logger = LoggerFactory.getLogger(Client
.class);
public static void main(String[] args) {
logger.info("SpringBoot initial Before");
ConfigurableApplicationContext run = SpringApplication.run(Server.class, args);
logger.info("SpringBoot initial After");
}
ConfigurableApplicationContext run = SpringApplication.run(Client.class, args);
HelloService helloService = run.getBean(HelloService.class);
logger.info(helloService.hello("hello"));
}
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment