apache / apache/dubbo-website

代码示例错误

Open
#3,070 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
491
Forks
809
Avg merge
1d 6h
Merged PRs (30d)
6

Description

content/zh-cn/overview/mannual/java-sdk/reference-manual/protocol/triple.md#spring-web注解

示例代码是这样的:
```java
@RestController
@RequestMapping("/demo")
public interface DemoService {
@GetMapping(value = "/hello")
String sayHello();
}
```

在starter网站下载的demo项目中这样做会导致启动报错,`ambiguous bean` 这样的错误。
去掉 `@RestController` 注解后,启动正常。

同时在示例项目 https://github.com/apache/dubbo-samples/blob/master/2-advanced/dubbo-samples-triple-rest/dubbo-samples-triple-rest-springmvc/src/main/java/org/apache/dubbo/rest/demo/DemoService.java 中,也没有 `@RestController` 注解。

Contributor guide

No contributing guide indexed for this repository

Research direction

Open content/zh-cn/overview/mannual/java-sdk/reference-manual/protocol/triple.md and review the Spring Web annotation example around the cited section. Compare it with the linked dubbo-samples DemoService.java; done means the documentation example matches the working sample and no longer includes the annotation that causes the reported startup error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.