Skip to content
Permalink
Browse files
完善测试调用关系;删除web依赖
  • Loading branch information
chickenlj committed Sep 11, 2017
1 parent 78f480a commit 753bac71886d68e907bfef3d82ab7fd0221081d1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
@@ -28,7 +28,7 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

<dependency>
@@ -3,10 +3,12 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


@SpringBootApplication
public class DubboFeatureTestApplication {

public static void main(String[] args) {
public static void main(String[] args) throws InterruptedException {
SpringApplication.run(DubboFeatureTestApplication.class, args);
Thread.sleep(100000000);
}
}
@@ -3,6 +3,7 @@
import com.alibaba.dubbo.test.service.CatService;
import com.alibaba.dubbo.test.service.MouseService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
@@ -11,6 +12,7 @@
@Service("catService")
public class CatServiceImpl implements CatService {

@Autowired
private MouseService mouseService;

@Override
@@ -4,15 +4,18 @@
import com.alibaba.dubbo.test.service.DogService;
import com.alibaba.dubbo.test.service.MouseService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* Created by ken.lj on 2017/9/8.
*/
@Service("dogService")
public class DogServiceImpl implements DogService {
@Autowired
private CatService catService;

@Autowired
private MouseService mouseService;

@Override
@@ -5,17 +5,21 @@
import com.alibaba.dubbo.test.service.LionService;
import com.alibaba.dubbo.test.service.MouseService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* Created by ken.lj on 2017/9/8.
*/
@Service("lionService")
public class LionServiceImpl implements LionService {
@Autowired
private CatService catService;

@Autowired
private MouseService mouseService;

@Autowired
private DogService dogService;

@Override
@@ -24,7 +24,8 @@
<dubbo:application name="Cat"/>

<!-- 使用multicast广播注册中心暴露服务地址 -->
<dubbo:registry address="zookeeper://11.160.112.23:2181?backup=11.239.190.141:2181,11.239.172.213:2181"/>
<dubbo:registry client="curator"
address="zookeeper://11.160.112.23:2181?backup=11.239.190.141:2181,11.239.172.213:2181"/>

<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="-1"/>

0 comments on commit 753bac7

Please sign in to comment.