package internal.org.springframework.content.autoconfigure.solr;

import org.apache.solr.client.solrj.SolrClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.content.commons.annotations.ContentRepositoryEventHandler;
import org.springframework.content.commons.operations.ContentOperations;
import org.springframework.content.commons.repository.events.AbstractContentRepositoryEventListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnBean({ SolrClient.class })
public class SolrAutoConfiguration {

	@Autowired private SolrClient solrClient;
	@Autowired private ContentOperations ops;

	public SolrAutoConfiguration() {
	}
	
	@Bean
	public Object solrFulltextEventListener() {
		return new SolrUpdateEventHandler(solrClient, ops);
	}

	@ContentRepositoryEventHandler
	public static class SolrFulltextEventListener extends AbstractContentRepositoryEventListener<Object> {

		@Override
		protected void onAfterSetContent(Object entity) {
			super.onAfterSetContent(entity);
		}
		
	}
}

@@ -951,255 +951,7 @@
 ;%0A%09%7D
-%0A%0A%09@ContentRepositoryEventHandler%0A%09public static class SolrFulltextEventListener extends AbstractContentRepositoryEventListener%3CObject%3E %7B%0A%0A%09%09@Override%0A%09%09protected void onAfterSetContent(Object entity) %7B%0A%09%09%09super.onAfterSetContent(entity);%0A%09%09%7D%0A%09%09%0A%09%7D
 %0A%7D%0A

Remove unwanted/old solr event handler [#137118871](https://www.pivotaltracker.com/story/show/137118871)