class SpringPluginContext extends DefaultPluginContext implements ApplicationContextAware {

    @Override
    public <T> T getPlugin(String pluginName) {
        final T plugin = super.getPlugin(pluginName);
        if (plugin == null) {
            try {
                return (T) applicationContext.getBean(pluginName);
            } catch (NoSuchBeanDefinitionException e) {
                return null;
            }
        }
        return plugin;
    }

}