How to register an event listener without depending on jira-core?

I am writing an event listener and I am wondering how to register the listener at the event system. The old Atlassian tutorial says that I should use InitializingBean and DisposableBean for that task. But both classes are part of the jira-core Maven dependency and Atlassian says that developers should avoid using this dependency.