OSGI 和@Reference(unbind="-")
OSGI and @Reference(unbind="-")
我正在使用 OSGI Enroute,我正在查看的示例程序之一具有以下内容:
@Reference(unbind = "-", name = "provider")
JDBCConnectionProvider jdbcConnectionProvider;
我在任何地方都没有看到“-”符号的记录,有人可以弄清楚这是什么意思吗?
来自声明式服务规范:
To declare no unbind method when the component type contains a method with the candidate name, the value "-" must be used.
这仅适用于带注释的方法(不适用于您在此处显示的字段),因此您正在查看的 enRoute 示例中很可能存在错误。
我正在使用 OSGI Enroute,我正在查看的示例程序之一具有以下内容:
@Reference(unbind = "-", name = "provider")
JDBCConnectionProvider jdbcConnectionProvider;
我在任何地方都没有看到“-”符号的记录,有人可以弄清楚这是什么意思吗?
来自声明式服务规范:
To declare no unbind method when the component type contains a method with the candidate name, the value "-" must be used.
这仅适用于带注释的方法(不适用于您在此处显示的字段),因此您正在查看的 enRoute 示例中很可能存在错误。