Skip to content

Commit d82ad48

Browse files
snicollwilkinsona
authored andcommitted
Create spring-boot-data-web module
1 parent a03dde9 commit d82ad48

File tree

17 files changed

+59
-14
lines changed

17 files changed

+59
-14
lines changed

Diff for: settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ 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"
6565
include "spring-boot-project:spring-boot-data-rest"
66+
include "spring-boot-project:spring-boot-data-web"
6667
include "spring-boot-project:spring-boot-dependencies"
6768
include "spring-boot-project:spring-boot-devtools"
6869
include "spring-boot-project:spring-boot-docker-compose"

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

-1
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.web.SpringDataWebAutoConfiguration
54
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
65
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration
76
org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQuerydslAutoConfiguration
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 New Project"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot-webmvc"))
13+
api("org.springframework.data:spring-data-commons")
14+
15+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
16+
17+
testImplementation(project(":spring-boot-project:spring-boot-data-jpa"))
18+
testImplementation(project(":spring-boot-project:spring-boot-test"))
19+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
20+
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
21+
22+
testRuntimeOnly("ch.qos.logback:logback-classic")
23+
testRuntimeOnly("com.h2database:h2")
24+
testRuntimeOnly("com.zaxxer:HikariCP")
25+
testRuntimeOnly("jakarta.servlet:jakarta.servlet-api")
26+
}
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* @author Andy Wilkinson
4444
* @author Vedran Pavic
4545
* @author Yanming Zhou
46-
* @since 1.2.0
46+
* @since 4.0.0
4747
*/
4848
@AutoConfiguration(afterName = "org.springframework.boot.data.rest.autoconfigure.RepositoryRestMvcAutoConfiguration")
4949
@EnableSpringDataWebSupport
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.
@@ -24,7 +24,7 @@
2424
*
2525
* @author Vedran Pavic
2626
* @author Yanming Zhou
27-
* @since 2.0.0
27+
* @since 4.0.0
2828
*/
2929
@ConfigurationProperties("spring.data.web")
3030
public class SpringDataWebProperties {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"groups": [],
3+
"properties": []
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
import org.springframework.boot.autoconfigure.AutoConfigurations;
2222
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
23-
import org.springframework.boot.autoconfigure.data.alt.jpa.City;
24-
import org.springframework.boot.autoconfigure.data.alt.jpa.CityJpaRepository;
23+
import org.springframework.boot.autoconfigure.data.web.domain.city.City;
24+
import org.springframework.boot.autoconfigure.data.web.domain.city.CityRepository;
2525
import org.springframework.boot.data.jpa.autoconfigure.JpaRepositoriesAutoConfiguration;
2626
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
2727
import org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration;
@@ -52,7 +52,7 @@ class SpringDataWebAutoConfigurationJpaTests {
5252
@Test
5353
void springDataWebIsConfiguredWithJpaRepositories() {
5454
this.contextRunner.withUserConfiguration(TestConfiguration.class).run((context) -> {
55-
assertThat(context).hasSingleBean(CityJpaRepository.class);
55+
assertThat(context).hasSingleBean(CityRepository.class);
5656
assertThat(context).hasSingleBean(PageableHandlerMethodArgumentResolver.class);
5757
assertThat(context).hasSingleBean(SortHandlerMethodArgumentResolver.class);
5858
assertThat(context.getBean(FormattingConversionService.class).canConvert(String.class, Distance.class))
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.

Diff for: spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/jpa/City.java renamed to spring-boot-project/spring-boot-data-web/src/test/java/org/springframework/boot/autoconfigure/data/web/domain/city/City.java

+1-1
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.alt.jpa;
17+
package org.springframework.boot.autoconfigure.data.web.domain.city;
1818

1919
import java.io.Serializable;
2020

+12-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.alt.jpa;
17+
package org.springframework.boot.autoconfigure.data.web.domain.city;
1818

19-
import org.springframework.data.repository.Repository;
19+
import org.springframework.data.domain.Page;
20+
import org.springframework.data.domain.Pageable;
21+
import org.springframework.data.jpa.repository.JpaRepository;
2022

21-
public interface CityJpaRepository extends Repository<City, Long> {
23+
public interface CityRepository extends JpaRepository<City, Long> {
24+
25+
@Override
26+
Page<City> findAll(Pageable pageable);
27+
28+
Page<City> findByNameLikeAndCountryLikeAllIgnoringCase(String name, String country, Pageable pageable);
29+
30+
City findByNameAndCountryAllIgnoringCase(String name, String country);
2231

2332
}

Diff for: spring-boot-project/spring-boot-dependencies/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -2008,6 +2008,7 @@ bom {
20082008
"spring-boot-data-r2dbc",
20092009
"spring-boot-data-redis",
20102010
"spring-boot-data-rest",
2011+
"spring-boot-data-web",
20112012
"spring-boot-devtools",
20122013
"spring-boot-docker-compose",
20132014
"spring-boot-elasticsearch",

Diff for: spring-boot-project/spring-boot-docs/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ dependencies {
7373
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "autoConfigurationMetadata"))
7474
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "autoConfigurationMetadata"))
7575
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-rest", configuration: "autoConfigurationMetadata"))
76+
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-web", configuration: "autoConfigurationMetadata"))
7677
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
7778
autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata"))
7879
autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata"))
@@ -134,6 +135,7 @@ dependencies {
134135
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "configurationPropertiesMetadata"))
135136
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "configurationPropertiesMetadata"))
136137
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-rest", configuration: "configurationPropertiesMetadata"))
138+
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-web", configuration: "configurationPropertiesMetadata"))
137139
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
138140
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))
139141
configurationProperties(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "configurationPropertiesMetadata"))

Diff for: spring-boot-project/spring-boot-starters/spring-boot-starter-data-rest/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ description = "Starter for exposing Spring Data repositories over REST using Spr
77
dependencies {
88
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
99
api(project(":spring-boot-project:spring-boot-data-rest"))
10+
api(project(":spring-boot-project:spring-boot-data-web"))
1011
api(project(":spring-boot-project:spring-boot-tx"))
1112
}

Diff for: spring-boot-project/spring-boot-test-autoconfigure/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ dependencies {
4646
optional(project(":spring-boot-project:spring-boot-data-neo4j"))
4747
optional(project(":spring-boot-project:spring-boot-data-r2dbc"))
4848
optional(project(":spring-boot-project:spring-boot-data-redis"))
49+
optional(project(":spring-boot-project:spring-boot-data-web"))
4950
optional(project(":spring-boot-project:spring-boot-flyway"))
5051
optional(project(":spring-boot-project:spring-boot-groovy-templates"))
5152
optional(project(":spring-boot-project:spring-boot-hateoas"))

Diff for: spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ optional:org.springframework.boot.mustache.autoconfigure.MustacheAutoConfigurati
77
optional:org.springframework.boot.thymeleaf.autoconfigure.ThymeleafAutoConfiguration
88
optional:org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration
99
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration
10-
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
10+
optional:org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
1111
org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration
1212
org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration
1313
org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration

0 commit comments

Comments
 (0)