Commit 3e376b95 authored by Stephane Nicoll's avatar Stephane Nicoll

Fix build failure

See gh-24943
parent 56ce5bdf
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -33,7 +33,6 @@ import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoCo ...@@ -33,7 +33,6 @@ import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoCo
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration; import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration; import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration; import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration; import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
...@@ -80,10 +79,12 @@ class WebEndpointsAutoConfigurationIntegrationTests { ...@@ -80,10 +79,12 @@ class WebEndpointsAutoConfigurationIntegrationTests {
Neo4jRepositoriesAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, Neo4jRepositoriesAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class,
MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class, MongoReactiveAutoConfiguration.class, MongoReactiveDataAutoConfiguration.class,
RepositoryRestMvcAutoConfiguration.class, HazelcastAutoConfiguration.class, RepositoryRestMvcAutoConfiguration.class, HazelcastAutoConfiguration.class,
ElasticsearchDataAutoConfiguration.class, SolrRepositoriesAutoConfiguration.class, ElasticsearchDataAutoConfiguration.class,
org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration.class,
SolrAutoConfiguration.class, RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class, SolrAutoConfiguration.class, RedisAutoConfiguration.class, RedisRepositoriesAutoConfiguration.class,
MetricsAutoConfiguration.class }) MetricsAutoConfiguration.class })
@SpringBootConfiguration @SpringBootConfiguration
@SuppressWarnings("deprecation")
static class WebEndpointTestApplication { static class WebEndpointTestApplication {
} }
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
package org.springframework.boot.autoconfigure.data.alt.solr; package org.springframework.boot.autoconfigure.data.alt.solr;
import org.springframework.boot.autoconfigure.data.solr.city.City;
import org.springframework.data.repository.Repository; import org.springframework.data.repository.Repository;
@Deprecated @Deprecated
public interface CitySolrRepository extends Repository<City, String> { public interface CitySolrRepository
extends Repository<org.springframework.boot.autoconfigure.data.solr.city.City, String> {
} }
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -24,10 +24,7 @@ import org.junit.jupiter.api.Test; ...@@ -24,10 +24,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.alt.solr.CitySolrRepository;
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage; import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
import org.springframework.boot.autoconfigure.data.solr.city.City;
import org.springframework.boot.autoconfigure.data.solr.city.CityRepository;
import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration; import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -55,7 +52,8 @@ class SolrRepositoriesAutoConfigurationTests { ...@@ -55,7 +52,8 @@ class SolrRepositoriesAutoConfigurationTests {
@Test @Test
void testDefaultRepositoryConfiguration() { void testDefaultRepositoryConfiguration() {
initContext(TestConfiguration.class); initContext(TestConfiguration.class);
assertThat(this.context.getBean(CityRepository.class)).isNotNull(); assertThat(this.context.getBean(org.springframework.boot.autoconfigure.data.solr.city.CityRepository.class))
.isNotNull();
assertThat(this.context.getBean(SolrClient.class)).isInstanceOf(HttpSolrClient.class); assertThat(this.context.getBean(SolrClient.class)).isInstanceOf(HttpSolrClient.class);
} }
...@@ -68,14 +66,15 @@ class SolrRepositoriesAutoConfigurationTests { ...@@ -68,14 +66,15 @@ class SolrRepositoriesAutoConfigurationTests {
@Test @Test
void doesNotTriggerDefaultRepositoryDetectionIfCustomized() { void doesNotTriggerDefaultRepositoryDetectionIfCustomized() {
initContext(CustomizedConfiguration.class); initContext(CustomizedConfiguration.class);
assertThat(this.context.getBean(CitySolrRepository.class)).isNotNull(); assertThat(this.context.getBean(org.springframework.boot.autoconfigure.data.solr.city.CityRepository.class))
.isNotNull();
} }
@Test @Test
void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() { void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() {
initContext(SortOfInvalidCustomConfiguration.class); initContext(SortOfInvalidCustomConfiguration.class);
assertThatExceptionOfType(NoSuchBeanDefinitionException.class) assertThatExceptionOfType(NoSuchBeanDefinitionException.class).isThrownBy(
.isThrownBy(() -> this.context.getBean(CityRepository.class)); () -> this.context.getBean(org.springframework.boot.autoconfigure.data.solr.city.CityRepository.class));
} }
private void initContext(Class<?> configClass) { private void initContext(Class<?> configClass) {
...@@ -87,7 +86,7 @@ class SolrRepositoriesAutoConfigurationTests { ...@@ -87,7 +86,7 @@ class SolrRepositoriesAutoConfigurationTests {
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@TestAutoConfigurationPackage(City.class) @TestAutoConfigurationPackage(org.springframework.boot.autoconfigure.data.solr.city.City.class)
static class TestConfiguration { static class TestConfiguration {
} }
...@@ -100,7 +99,8 @@ class SolrRepositoriesAutoConfigurationTests { ...@@ -100,7 +99,8 @@ class SolrRepositoriesAutoConfigurationTests {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@TestAutoConfigurationPackage(SolrRepositoriesAutoConfigurationTests.class) @TestAutoConfigurationPackage(SolrRepositoriesAutoConfigurationTests.class)
@EnableSolrRepositories(basePackageClasses = CitySolrRepository.class) @EnableSolrRepositories(
basePackageClasses = org.springframework.boot.autoconfigure.data.solr.city.CityRepository.class)
static class CustomizedConfiguration { static class CustomizedConfiguration {
} }
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment