I can't use plugin when i add this class to proejct:
Component
public class PluginEnabledListener implements InitializingBean, DisposableBean {
@JiraImport
private final EventPublisher eventPublisher;
@Autowired
public PluginEnabledListener(EventPublisher eventPublisher) {
this.eventPublisher = eventPublisher;
}
@Override
public void destroy() throws Exception {
eventPublisher.unregister(this);
}
@Override
public void afterPropertiesSet() throws Exception {
eventPublisher.register(this);
}
@EventListener
public void onPluginEnable(PluginEnabledEvent pluginEnabledEvent) {
log.error(pluginEnabledEvent.getPlugin().getKey());
}
}
Mb someone knows what is wrong.
Thanks!
Can you provide more details about the problems you're having? What do you mean by "I can't use the plugin"?
It's disabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well you need to check the logs and see what happened. Probably the problem is not related to the code above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.