sofastack/sofa-rpc

SOFABoot quick start documentation issue

Open

#1031 opened on Apr 19, 2021

View on GitHub
 (15 comments) (0 reactions) (0 assignees)Java (3,749 stars) (1,151 forks)batch import
good first issueremind

Description

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.

Contributor guide