An anonymous bean specified inside of the osgi:service element allows you to avoid cluttering the namespace.

An anonymous bean specified inside of the osgi:service element allows you to avoid cluttering the namespace.
A. True
B. False
 
Answer: a
Explanation: You can abbreviate the syntax by using an anonymous bean.
Code:
<osgi:service auto-export="all-classes" ref="greeterService">
<osgi:interfaces>
<value>com.apress.springrecipes.osgi.helloworld.service.GreeterService</value>
<value>com.apress.springrecipes.osgi.helloworld.service.GreetingRecorderService</value>
</osgi:interfaces>
</osgi:service>
 

Tìm kiếm

Back
Top