trydofor opened a new issue, #3286:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3286
声明中仅支持`FIELD`,希望增加`METHOD`,最好和`@Autowired`一样,支持更多。
如同时支持 `CONSTRUCTOR`, `METHOD`, `PARAMETER`, `FIELD`
```java
@Target({FIELD, ANNOTATION_TYPE})
public @interface RpcReference {
String microserviceName();
String schemaId() default "";
}
```
理由如下:
* 在实践中,推荐以setter注入取代field注入。
* 同时IDEA提示 Private field 'xxx' is never assigned
* 已有关联issue
[[SCB-2297]](https://github.com/apache/servicecomb-java-chassis/pull/2473/),估计影响不大
```java
@RpcReference(microserviceName = "winx-api", schemaId = "winx-hello")
private HelloContract winxHelloContract;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]