OH4.1.1 DS Declaration for EventSubscriber

From the link below, where do we specify this component in our project?

and can’t we use service injection method like this instead?
@Component(service = { XXXX.class, EventSubscriber.class }, immediate = true)

If your question is about necessity to write XML - annotations are sufficient as they are used during build time to generate XML.

1 Like

I’ve created a PR to update the examples: