sofastack/sofa-rpc

SOFABoot quick start documentation issue

Open

#1,031 建立於 2021年4月19日

在 GitHub 查看
 (15 留言) (0 反應) (0 負責人)Java (3,749 star) (1,151 fork)batch import
good first issueremind

描述

I walked through the SOFABoot quick start guides and have some suggestions.

1. It's not always easy to change the parent pom, so it's better to document an alternative way, e.g. import the sofaboot-dependencies in dependencyManagement

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.alipay.sofa</groupId>
        <artifactId>sofaboot-dependencies</artifactId>
        <version>${sofa.boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

2. XML configuration is not widely used now, we'd better update the quick start documents using annotation examples

3. The annotation should be more user friendly

Take the example below:

  1. after the @SofaService is annotated, the @Component should not be necessary
  2. The interfaceType is not mandatory, our sample could remove it
  3. It's not good to let users specify binding type as string, it's better to provide some enums for bindings.
@SofaService(interfaceType = HelloSyncService.class, bindings = {@SofaServiceBinding(bindingType = "bolt")})
@Component
public class HelloSyncServiceImpl implements HelloSyncService {
  ...
}

4. Registry instructions should be added in the quick start doc

Currently there is no such instruction, so the user could not run the demo following the quick start doc from scratch.

貢獻者指南