Deprecate Spring Data Solr support

Closes gh-24942
pull/25129/head
Stephane Nicoll 4 years ago
parent 28ed3355bd
commit 10b4cb8cb5

@ -40,6 +40,7 @@ import org.springframework.data.solr.repository.support.SolrRepositoryFactoryBea
*
* @author Christoph Strobl
* @author Oliver Gierke
* @deprecated since 2.3.9 as Spring Data Solr is deprecated
* @since 1.1.0
*/
@Configuration(proxyBeanMethods = false)
@ -48,6 +49,7 @@ import org.springframework.data.solr.repository.support.SolrRepositoryFactoryBea
@ConditionalOnProperty(prefix = "spring.data.solr.repositories", name = "enabled", havingValue = "true",
matchIfMissing = true)
@Import(SolrRepositoriesRegistrar.class)
@Deprecated
public class SolrRepositoriesAutoConfiguration {
}

@ -30,6 +30,7 @@ import org.springframework.data.solr.repository.config.SolrRepositoryConfigExten
*
* @author Christoph Strobl
*/
@Deprecated
class SolrRepositoriesRegistrar extends AbstractRepositoryConfigurationSourceSupport {
@Override

@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.data.alt.solr;
import org.springframework.boot.autoconfigure.data.solr.city.City;
import org.springframework.data.repository.Repository;
@Deprecated
public interface CitySolrRepository extends Repository<City, String> {
}

@ -23,9 +23,9 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.alt.elasticsearch.CityElasticsearchDbRepository;
import org.springframework.boot.autoconfigure.data.alt.jpa.CityJpaRepository;
import org.springframework.boot.autoconfigure.data.alt.mongo.CityMongoDbRepository;
import org.springframework.boot.autoconfigure.data.alt.solr.CitySolrRepository;
import org.springframework.boot.autoconfigure.data.jpa.city.City;
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
@ -162,7 +162,7 @@ class JpaRepositoriesAutoConfigurationTests {
@EnableJpaRepositories(
basePackageClasses = org.springframework.boot.autoconfigure.data.alt.jpa.CityJpaRepository.class,
excludeFilters = { @Filter(type = FilterType.ASSIGNABLE_TYPE, value = CityMongoDbRepository.class),
@Filter(type = FilterType.ASSIGNABLE_TYPE, value = CitySolrRepository.class) })
@Filter(type = FilterType.ASSIGNABLE_TYPE, value = CityElasticsearchDbRepository.class) })
@TestAutoConfigurationPackage(City.class)
static class CustomConfiguration {

@ -42,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Christoph Strobl
* @author Oliver Gierke
*/
@Deprecated
class SolrRepositoriesAutoConfigurationTests {
private AnnotationConfigApplicationContext context;

@ -24,6 +24,7 @@ import org.springframework.data.solr.core.mapping.SolrDocument;
* @author Christoph Strobl
*/
@SolrDocument(collection = "collection1")
@Deprecated
public class City {
@Id

@ -20,6 +20,7 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;
@Deprecated
public interface CityRepository extends Repository<City, String> {
Page<City> findByNameStartingWith(String name, Pageable page);

@ -4494,6 +4494,7 @@ https://lucene.apache.org/solr/[Apache Solr] is a search engine.
Spring Boot offers basic auto-configuration for the Solr 5 client library and the abstractions on top of it provided by https://github.com/spring-projects/spring-data-solr[Spring Data Solr].
There is a `spring-boot-starter-data-solr` "`Starter`" for collecting the dependencies in a convenient way.
NOTE: As of Spring Boot 2.3, support for Spring Data Solr has been deprecated and will be removed in a future release.
[[boot-features-connecting-to-solr]]

@ -2,7 +2,7 @@ plugins {
id "org.springframework.boot.starter"
}
description = "Starter for using the Apache Solr search platform with Spring Data Solr"
description = "Starter for using the Apache Solr search platform with Spring Data Solr. Deprecated since 2.3.9"
dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))

Loading…
Cancel
Save