Skip to content

配置注入的文档实现修改#104

Merged
yhs0092 merged 2 commits intoapache:masterfrom
pengliang56:ConfigInject-DocModify
May 29, 2019
Merged

配置注入的文档实现修改#104
yhs0092 merged 2 commits intoapache:masterfrom
pengliang56:ConfigInject-DocModify

Conversation

@pengliang56
Copy link
Copy Markdown

No description provided.


```Java
ConfigNoAnnotation config = new ConfigObjectFactory().create(ConfigNoAnnotation.class);
ConfigNoAnnotation config = priorityPropertyManager.createConfigObject(ConfigNoAnnotation.class);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to show how to get the instance of PriorityPropertyManager. You can get example from org.apache.servicecomb.core.definition.OperationMeta#init, a config object is created here : )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And there is no such method in PriorityPropertyManager. Please keep the demo code correct and as less misleading as possible.

@pengliang56 pengliang56 force-pushed the ConfigInject-DocModify branch 2 times, most recently from 279be9e to c23b680 Compare May 29, 2019 03:42
);
```

最后不管是有无注解的属性注入,都要显示的回收对象PriorityPropertyManager
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

都要"显式地"回收配置注入对象

fix typo, and the objects should be collected are the injected ConfigObject instances, instead of the PriorityPropertyManager

@pengliang56 pengliang56 force-pushed the ConfigInject-DocModify branch from c23b680 to abd69c6 Compare May 29, 2019 03:51
@pengliang56 pengliang56 force-pushed the ConfigInject-DocModify branch from abd69c6 to e8fc1b9 Compare May 29, 2019 06:29
@yhs0092 yhs0092 merged commit 06ab1ac into apache:master May 29, 2019
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

Successfully merging this pull request may close these issues.

2 participants