<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation</artifactId>
<version>1.4.0</version>
</dependency>
import org.osgi.annotation.versioning.ProviderType;
@ProviderType
public interface UserService {
User getUserById(int id);
}
import org.osgi.annotation.versioning.ConsumerType;
import org.osgi.annotation.versioning.ProviderType;
@ConsumerType
public interface UserClient {
void processUser(User user);
}
@ProviderType
public interface UserService {
User getUserById(int id);
}