Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
http://felix.apache.org/site/how-to-use-ipojo-annotations.html#HowtouseiPOJOAnnotations-@ServiceProperty上的“服务属性”和“属性”有什么区别?
@ServiceProperty 与组件提供的 (OSGi) 服务一起发布。另一方面,@Property 是保密的。
例如:
@Component @Provides public class MyComponent implements MyService { @Property private String hidden; @ServiceProperty private String shown; [...] }
此组件发布具有“显示”属性的 MyService“服务”。“隐藏”未发布。