sofastack / sofa-rpc-boot-projects

SOFABoot projects for SOFARPC, include starter and samples.
https://github.com/sofastack/sofa-rpc
Apache License 2.0
292 stars 117 forks source link

关于restful风格的一些疑问 #25

Closed renshihan closed 6 years ago

renshihan commented 6 years ago

我尝试使用rpc-sofa-boot-starter启动依赖,参考rpc-sofa-boot-samples项目,使用restful风格方式,代码分为server和client,目前本地项目可正常启动,但是访问client端调用服务会报java.lang.IllegalArgumentException: You did not supply enough values to fill path parameters

我有几点疑惑关于rpc-sofa-boot-starter: 1.采用restful风格,服务端提供的服务是注册进入zookeeper了么? 2.可否有控制台来查看维护的服务列表。 3.针对其他非sofa服务,能否与服务端实现连接 4.xml配置不太好看,可否改为类初始化 项目提交到https://github.com/renshihan/sofa-boot-study.git,

ujjboy commented 6 years ago

https://github.com/renshihan/sofa-boot-study/blob/master/sofa-boot-study-api/src/main/java/com/renshihan/sofa/api/service/HelloSyncService.java

public interface HelloSyncService {
    @GET
    @Path("/restService/{id}")
    String saySync(@PathParam("id") String id); // 加上 @PathParam("id") 试试
}