Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

代码示例错误 #3070

Open
zhhw opened this issue Dec 3, 2024 · 0 comments
Open

代码示例错误 #3070

zhhw opened this issue Dec 3, 2024 · 0 comments

Comments

@zhhw
Copy link

zhhw commented Dec 3, 2024

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

示例代码是这样的:

@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 注解。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant