Browse Source

Create spring-boot-data-rest module

Closes gh-46130
pull/46230/head
Stéphane Nicoll 9 months ago committed by Andy Wilkinson
parent
commit
b70370da0b
  1. 1
      settings.gradle
  2. 1
      spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle
  3. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java
  4. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java
  5. 1
      spring-boot-project/spring-boot-autoconfigure-all/build.gradle
  6. 3
      spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java
  7. 1
      spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  8. 44
      spring-boot-project/spring-boot-data-rest/build.gradle
  9. 7
      spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/RepositoryRestMvcAutoConfiguration.java
  10. 4
      spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/RepositoryRestProperties.java
  11. 2
      spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/SpringBootRepositoryRestConfigurer.java
  12. 2
      spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/package-info.java
  13. 1
      spring-boot-project/spring-boot-data-rest/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  14. 4
      spring-boot-project/spring-boot-data-rest/src/test/java/org/springframework/boot/data/rest/autoconfigure/RepositoryRestMvcAutoConfigurationTests.java
  15. 76
      spring-boot-project/spring-boot-data-rest/src/test/java/org/springframework/boot/data/rest/domain/city/City.java
  16. 32
      spring-boot-project/spring-boot-data-rest/src/test/java/org/springframework/boot/data/rest/domain/city/CityRepository.java
  17. 1
      spring-boot-project/spring-boot-dependencies/build.gradle
  18. 2
      spring-boot-project/spring-boot-docs/build.gradle
  19. 2
      spring-boot-project/spring-boot-starters/spring-boot-starter-data-rest/build.gradle

1
settings.gradle

@ -78,6 +78,7 @@ include "spring-boot-project:spring-boot-data-mongodb"
include "spring-boot-project:spring-boot-data-neo4j" include "spring-boot-project:spring-boot-data-neo4j"
include "spring-boot-project:spring-boot-data-r2dbc" include "spring-boot-project:spring-boot-data-r2dbc"
include "spring-boot-project:spring-boot-data-redis" include "spring-boot-project:spring-boot-data-redis"
include "spring-boot-project:spring-boot-data-rest"
include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-dependencies"
include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-devtools"
include "spring-boot-project:spring-boot-docker-compose" include "spring-boot-project:spring-boot-docker-compose"

1
spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

@ -163,6 +163,7 @@ dependencies {
optional("org.springframework.session:spring-session-core") optional("org.springframework.session:spring-session-core")
optional("redis.clients:jedis") optional("redis.clients:jedis")
testImplementation(project(":spring-boot-project:spring-boot-data-rest"))
testImplementation(project(":spring-boot-project:spring-boot-hateoas")) testImplementation(project(":spring-boot-project:spring-boot-hateoas"))
testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java

@ -24,7 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTraci
import org.springframework.boot.actuate.health.HealthEndpointWebExtension; import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension; import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration; import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.context.annotation.UserConfigurations; import org.springframework.boot.context.annotation.UserConfigurations;
import org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoConfiguration; import org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoConfiguration;
@ -35,6 +34,7 @@ import org.springframework.boot.data.neo4j.autoconfigure.Neo4jDataAutoConfigurat
import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration; import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration; import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration;
import org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration; import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration; import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration; import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebMvcEndpointIntegrationTests.java

@ -31,8 +31,8 @@ import org.springframework.boot.actuate.autoconfigure.web.servlet.ServletManagem
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping; import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.hateoas.autoconfigure.HypermediaAutoConfiguration; import org.springframework.boot.hateoas.autoconfigure.HypermediaAutoConfiguration;
import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;

1
spring-boot-project/spring-boot-autoconfigure-all/build.gradle

@ -61,6 +61,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-data-jpa")) optional(project(":spring-boot-project:spring-boot-data-jpa"))
optional(project(":spring-boot-project:spring-boot-data-mongodb")) optional(project(":spring-boot-project:spring-boot-data-mongodb"))
optional(project(":spring-boot-project:spring-boot-data-redis")) optional(project(":spring-boot-project:spring-boot-data-redis"))
optional(project(":spring-boot-project:spring-boot-data-rest"))
optional(project(":spring-boot-project:spring-boot-flyway")) optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-h2console")) optional(project(":spring-boot-project:spring-boot-h2console"))
optional(project(":spring-boot-project:spring-boot-hazelcast")) optional(project(":spring-boot-project:spring-boot-hazelcast"))

3
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/web/SpringDataWebAutoConfiguration.java

@ -22,7 +22,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageable; import org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageable;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -46,7 +45,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
* @author Yanming Zhou * @author Yanming Zhou
* @since 1.2.0 * @since 1.2.0
*/ */
@AutoConfiguration(after = RepositoryRestMvcAutoConfiguration.class) @AutoConfiguration(afterName = "org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration")
@EnableSpringDataWebSupport @EnableSpringDataWebSupport
@ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass({ PageableHandlerMethodArgumentResolver.class, WebMvcConfigurer.class }) @ConditionalOnClass({ PageableHandlerMethodArgumentResolver.class, WebMvcConfigurer.class })

1
spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@ -1,7 +1,6 @@
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration

44
spring-boot-project/spring-boot-data-rest/build.gradle

@ -0,0 +1,44 @@
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id "java-library"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot Data REST"
dependencies {
api(project(":spring-boot-project:spring-boot-webmvc"))
api(project(":spring-boot-project:spring-boot-jackson"))
api("org.springframework.data:spring-data-rest-webmvc")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
testImplementation(project(":spring-boot-project:spring-boot-data-jpa"))
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
testImplementation("jakarta.servlet:jakarta.servlet-api")
testRuntimeOnly("ch.qos.logback:logback-classic")
testRuntimeOnly("com.h2database:h2")
testRuntimeOnly("com.zaxxer:HikariCP")
}

7
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfiguration.java → spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/RepositoryRestMvcAutoConfiguration.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.rest; package org.springframework.boot.data.rest.autoconfigure;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.AutoConfiguration;
@ -24,6 +24,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration; import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
@ -43,9 +44,9 @@ import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
* @author Rob Winch * @author Rob Winch
* @author Stephane Nicoll * @author Stephane Nicoll
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.1.0 * @since 4.0.0
*/ */
@AutoConfiguration(afterName = "org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration") @AutoConfiguration(after = JacksonAutoConfiguration.class)
@ConditionalOnWebApplication(type = Type.SERVLET) @ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnMissingBean(RepositoryRestMvcConfiguration.class) @ConditionalOnMissingBean(RepositoryRestMvcConfiguration.class)
@ConditionalOnClass(RepositoryRestMvcConfiguration.class) @ConditionalOnClass(RepositoryRestMvcConfiguration.class)

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestProperties.java → spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/RepositoryRestProperties.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.rest; package org.springframework.boot.data.rest.autoconfigure;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper; import org.springframework.boot.context.properties.PropertyMapper;
@ -26,7 +26,7 @@ import org.springframework.http.MediaType;
* Configuration properties for Spring Data REST. * Configuration properties for Spring Data REST.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.0 * @since 4.0.0
*/ */
@ConfigurationProperties("spring.data.rest") @ConfigurationProperties("spring.data.rest")
public class RepositoryRestProperties { public class RepositoryRestProperties {

2
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/rest/SpringBootRepositoryRestConfigurer.java → spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/SpringBootRepositoryRestConfigurer.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.rest; package org.springframework.boot.data.rest.autoconfigure;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;

2
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/rest/package-info.java → spring-boot-project/spring-boot-data-rest/src/main/java/org/springframework/boot/data/rest/autoconfigure/package-info.java

@ -17,4 +17,4 @@
/** /**
* Auto-configuration for Spring Data REST. * Auto-configuration for Spring Data REST.
*/ */
package org.springframework.boot.autoconfigure.data.rest; package org.springframework.boot.data.rest.autoconfigure;

1
spring-boot-project/spring-boot-data-rest/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@ -0,0 +1 @@
org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration

4
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java → spring-boot-project/spring-boot-data-rest/src/test/java/org/springframework/boot/data/rest/autoconfigure/RepositoryRestMvcAutoConfigurationTests.java

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.autoconfigure.data.rest; package org.springframework.boot.data.rest.autoconfigure;
import java.net.URI; import java.net.URI;
@ -24,8 +24,8 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
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.jpa.City;
import org.springframework.boot.data.jpa.autoconfigure.JpaRepositoriesAutoConfiguration; import org.springframework.boot.data.jpa.autoconfigure.JpaRepositoriesAutoConfiguration;
import org.springframework.boot.data.rest.domain.city.City;
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration; import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration; import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration;
import org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration; import org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration;

76
spring-boot-project/spring-boot-data-rest/src/test/java/org/springframework/boot/data/rest/domain/city/City.java

@ -0,0 +1,76 @@
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.data.rest.domain.city;
import java.io.Serializable;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
@Entity
public class City implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String state;
@Column(nullable = false)
private String country;
@Column(nullable = false)
private String map;
protected City() {
}
public City(String name, String country) {
this.name = name;
this.country = country;
}
public String getName() {
return this.name;
}
public String getState() {
return this.state;
}
public String getCountry() {
return this.country;
}
public String getMap() {
return this.map;
}
@Override
public String toString() {
return getName() + "," + getState() + "," + getCountry();
}
}

32
spring-boot-project/spring-boot-data-rest/src/test/java/org/springframework/boot/data/rest/domain/city/CityRepository.java

@ -0,0 +1,32 @@
/*
* Copyright 2012-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.data.rest.domain.city;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
public interface CityRepository extends JpaRepository<City, Long> {
@Override
Page<City> findAll(Pageable pageable);
Page<City> findByNameLikeAndCountryLikeAllIgnoringCase(String name, String country, Pageable pageable);
City findByNameAndCountryAllIgnoringCase(String name, String country);
}

1
spring-boot-project/spring-boot-dependencies/build.gradle

@ -2006,6 +2006,7 @@ bom {
"spring-boot-data-neo4j", "spring-boot-data-neo4j",
"spring-boot-data-r2dbc", "spring-boot-data-r2dbc",
"spring-boot-data-redis", "spring-boot-data-redis",
"spring-boot-data-rest",
"spring-boot-devtools", "spring-boot-devtools",
"spring-boot-docker-compose", "spring-boot-docker-compose",
"spring-boot-elasticsearch", "spring-boot-elasticsearch",

2
spring-boot-project/spring-boot-docs/build.gradle

@ -94,6 +94,7 @@ dependencies {
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-rest", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata"))
@ -154,6 +155,7 @@ dependencies {
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-rest", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata"))

2
spring-boot-project/spring-boot-starters/spring-boot-starter-data-rest/build.gradle

@ -22,6 +22,6 @@ description = "Starter for exposing Spring Data repositories over REST using Spr
dependencies { dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
api(project(":spring-boot-project:spring-boot-data-rest"))
api(project(":spring-boot-project:spring-boot-tx")) api(project(":spring-boot-project:spring-boot-tx"))
api("org.springframework.data:spring-data-rest-webmvc")
} }

Loading…
Cancel
Save