Skip to content

Commit a03dde9

Browse files
snicollwilkinsona
authored andcommitted
Create spring-boot-data-rest module
1 parent ef1ab2e commit a03dde9

File tree

19 files changed

+159
-18
lines changed

19 files changed

+159
-18
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ include "spring-boot-project:spring-boot-data-mongodb"
6262
include "spring-boot-project:spring-boot-data-neo4j"
6363
include "spring-boot-project:spring-boot-data-r2dbc"
6464
include "spring-boot-project:spring-boot-data-redis"
65+
include "spring-boot-project:spring-boot-data-rest"
6566
include "spring-boot-project:spring-boot-dependencies"
6667
include "spring-boot-project:spring-boot-devtools"
6768
include "spring-boot-project:spring-boot-docker-compose"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ dependencies {
156156
optional("org.springframework.session:spring-session-core")
157157
optional("redis.clients:jedis")
158158

159+
testImplementation(project(":spring-boot-project:spring-boot-data-rest"))
159160
testImplementation(project(":spring-boot-project:spring-boot-hateoas"))
160161
testImplementation(project(":spring-boot-project:spring-boot-test"))
161162
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
2525
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
2626
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
2827
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
2928
import org.springframework.boot.context.annotation.UserConfigurations;
3029
import org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoConfiguration;
@@ -35,6 +34,7 @@
3534
import org.springframework.boot.data.neo4j.autoconfigure.Neo4jReactiveDataAutoConfiguration;
3635
import org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration;
3736
import org.springframework.boot.data.redis.autoconfigure.RedisRepositoriesAutoConfiguration;
37+
import org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration;
3838
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
3939
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;
4040
import org.springframework.boot.liquibase.autoconfigure.LiquibaseAutoConfiguration;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping;
3232
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
3333
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
34-
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
3534
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
35+
import org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration;
3636
import org.springframework.boot.hateoas.autoconfigure.HypermediaAutoConfiguration;
3737
import org.springframework.boot.http.autoconfigure.HttpMessageConvertersAutoConfiguration;
3838
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies {
4444
optional(project(":spring-boot-project:spring-boot-data-jpa"))
4545
optional(project(":spring-boot-project:spring-boot-data-mongodb"))
4646
optional(project(":spring-boot-project:spring-boot-data-redis"))
47+
optional(project(":spring-boot-project:spring-boot-data-rest"))
4748
optional(project(":spring-boot-project:spring-boot-flyway"))
4849
optional(project(":spring-boot-project:spring-boot-h2console"))
4950
optional(project(":spring-boot-project:spring-boot-hazelcast"))

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
2222
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2323
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
25-
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
2625
import org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties.Pageable;
2726
import org.springframework.boot.context.properties.EnableConfigurationProperties;
2827
import org.springframework.context.annotation.Bean;
@@ -46,7 +45,7 @@
4645
* @author Yanming Zhou
4746
* @since 1.2.0
4847
*/
49-
@AutoConfiguration(after = RepositoryRestMvcAutoConfiguration.class)
48+
@AutoConfiguration(afterName = "org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration")
5049
@EnableSpringDataWebSupport
5150
@ConditionalOnWebApplication(type = Type.SERVLET)
5251
@ConditionalOnClass({ PageableHandlerMethodArgumentResolver.class, WebMvcConfigurer.class })

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
22
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
33
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration
4-
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration
54
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
65
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
76
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.auto-configuration"
4+
id "org.springframework.boot.configuration-properties"
5+
id "org.springframework.boot.deployed"
6+
id "org.springframework.boot.optional-dependencies"
7+
}
8+
9+
description = "Spring Boot Data REST"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot-webmvc"))
13+
api(project(":spring-boot-project:spring-boot-jackson"))
14+
api("org.springframework.data:spring-data-rest-webmvc")
15+
16+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
17+
18+
testImplementation(project(":spring-boot-project:spring-boot-data-jpa"))
19+
testImplementation(project(":spring-boot-project:spring-boot-test"))
20+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
21+
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
22+
testImplementation("jakarta.servlet:jakarta.servlet-api")
23+
24+
testRuntimeOnly("ch.qos.logback:logback-classic")
25+
testRuntimeOnly("com.h2database:h2")
26+
testRuntimeOnly("com.zaxxer:HikariCP")
27+
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.rest;
17+
package org.springframework.boot.data.rest.autoconfigure;
1818

1919
import org.springframework.beans.factory.ObjectProvider;
2020
import org.springframework.boot.autoconfigure.AutoConfiguration;
@@ -24,6 +24,7 @@
2424
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
2626
import org.springframework.boot.context.properties.EnableConfigurationProperties;
27+
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
2728
import org.springframework.context.annotation.Bean;
2829
import org.springframework.context.annotation.Import;
2930
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
@@ -43,9 +44,9 @@
4344
* @author Rob Winch
4445
* @author Stephane Nicoll
4546
* @author Andy Wilkinson
46-
* @since 1.1.0
47+
* @since 4.0.0
4748
*/
48-
@AutoConfiguration(afterName = "org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration")
49+
@AutoConfiguration(after = JacksonAutoConfiguration.class)
4950
@ConditionalOnWebApplication(type = Type.SERVLET)
5051
@ConditionalOnMissingBean(RepositoryRestMvcConfiguration.class)
5152
@ConditionalOnClass(RepositoryRestMvcConfiguration.class)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.rest;
17+
package org.springframework.boot.data.rest.autoconfigure;
1818

1919
import org.springframework.boot.context.properties.ConfigurationProperties;
2020
import org.springframework.boot.context.properties.PropertyMapper;
@@ -26,7 +26,7 @@
2626
* Configuration properties for Spring Data REST.
2727
*
2828
* @author Stephane Nicoll
29-
* @since 1.3.0
29+
* @since 4.0.0
3030
*/
3131
@ConfigurationProperties("spring.data.rest")
3232
public class RepositoryRestProperties {

0 commit comments

Comments
 (0)