Skip to content

SOFABoot quick start documentation issue #1031

Description

@nobodyiam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions