6 changed files with 77 additions and 20 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 @@
|
||||
dubbo: |
||||
enabled: false |
||||
spring: |
||||
application: |
||||
name: im-entry |
||||
dubbo: |
||||
application: |
||||
name: ${spring.application.name} |
||||
#enabled: true |
||||
registry: |
||||
address: zookeeper://124.222.131.236:3181?timeout=10000 |
||||
client: zkclient |
||||
Loading…
Reference in new issue