6 changed files with 72 additions and 8 deletions
@ -0,0 +1,7 @@ |
|||||||
|
package net.sopod.soim.entry.service; |
||||||
|
|
||||||
|
public interface HelloService { |
||||||
|
|
||||||
|
String sayHello(String name); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package net.sopod.soim.entry.service; |
||||||
|
|
||||||
|
import org.apache.dubbo.config.annotation.DubboService; |
||||||
|
import org.apache.dubbo.rpc.RpcContext; |
||||||
|
|
||||||
|
/** |
||||||
|
* HelloServiceImpl |
||||||
|
* |
||||||
|
* @author tmy |
||||||
|
* @date 2022-03-28 16:23 |
||||||
|
*/ |
||||||
|
@DubboService(version = "1.0.0") |
||||||
|
public class HelloServiceImpl implements HelloService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public String sayHello(String name) { |
||||||
|
System.out.println("be invoked! client:" + RpcContext.getClientAttachment().getObjectAttachments()); |
||||||
|
return "hello "+ name; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -1,4 +1,10 @@ |
|||||||
|
spring: |
||||||
|
application: |
||||||
|
name: im-entry |
||||||
dubbo: |
dubbo: |
||||||
enabled: false |
|
||||||
application: |
application: |
||||||
name: im-entry |
name: ${spring.application.name} |
||||||
|
#enabled: true |
||||||
|
registry: |
||||||
|
address: zookeeper://124.222.131.236:2181?timeout=10000 |
||||||
|
client: zkclient |
||||||
Loading…
Reference in new issue