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

考虑添加一个SofaBean注解 #901

Closed
Kunple-w opened this issue Dec 23, 2021 · 2 comments
Closed

考虑添加一个SofaBean注解 #901

Kunple-w opened this issue Dec 23, 2021 · 2 comments

Comments

@Kunple-w
Copy link

In what area(s)?

/area runtime

/area operator
/area placement
/area docs
/area test-and-release

Describe the feature

对应@SofaService@Service/@Component的对应关系,是否应该有个@SofaBean对应Bean,以免去在配置类中重复写@Bean

目前的写法

public class MultiSofaServiceConfiguration {

    @Bean("multiSofaService")
    @SofaService
    SampleService service() {
        return new DefaultSampleService();
    }
}

期望的写法:

public class MultiSofaServiceConfiguration {

    @SofaBean("multiSofaService")
    SampleService service() {
        return new DefaultSampleService();
    }
}
@MingJunDuan
Copy link

May refer to sofa-rpc issue #1031

@HzjNeverStop
Copy link
Contributor

已支持 @SofaServiceBean 注解,同时包含了 @SofaServic 和 @ Component 的能力

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

3 participants