将felix注释属性最终字符串迁移到OSGI中
是否有人可以将此迁移写入OSGI将felix注释属性最终字符串迁移到OSGI中,osgi,aem,apache-felix,Osgi,Aem,Apache Felix,是否有人可以将此迁移写入OSGI @Component(immediate = true, service = CustomExternalizer.class, properties = { "process.label=Custom Externalizer Service" }, configurationPolicy = ConfigurationPolicy.REQUIR
@Component(immediate = true, service = CustomExternalizer.class,
properties = {
"process.label=Custom Externalizer Service"
},
configurationPolicy = ConfigurationPolicy.REQUIRE)
@Designate(ocd = CustomExternalizerImpl.Config.class)
public class CustomExternalizerImpl implements CustomExternalizer {
// its felix => this need to OSGI
@Property(label = "Domains", unbounded = PropertyUnbounded.ARRAY,
description = "List of domain mappings. In the form: '<site root path> scheme://domain[:port]'."
+ "Standard required names are 'author' and 'publish'")
public static final String PROPERTY_EXTERNALIZER_DOMAINS = "externalizer.domains";
@ObjectClassDefinition
protected @interface Config {
@AttributeDefinition(
???????????
}
@Component(immediate=true,service=CustomExternalizer.class,
属性={
“process.label=自定义外部化器服务”
},
configurationPolicy=configurationPolicy.REQUIRE)
@指定(ocd=CustomExternalizerImpl.Config.class)
公共类CustomExternalizerImpl实现CustomExternalizer{
//它的felix=>这需要OSGI
@属性(label=“Domains”,unbounded=propertyunbunded.ARRAY,
description=“域映射列表。格式为:”scheme://domain[:端口]”
+“标准要求的名称为‘作者’和‘出版’”)
公共静态最终字符串属性\u EXTERNALIZER\u DOMAINS=“EXTERNALIZER.DOMAINS”;
@ObjectClassDefinition
受保护的@interface配置{
@属性定义(
???????????
}
我尝试了一些方法,但只有mix我不确定我是否理解这个问题。你是在问如何将此代码迁移到使用OSGi R 6注释而不是Felix SCR吗?你发布的代码段似乎包含了两者的混合。删除所有Felix SCR导入,并使用此指南thk,我自己解决它,但