Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
900fdde
Upgrade to Spring Authorization Server 1.3.6
snicoll Apr 23, 2025
fc68fe5
Upgrade to Spring Pulsar 1.1.11
snicoll Apr 23, 2025
9263af3
Upgrade to Spring Session 3.3.7
snicoll Apr 23, 2025
9443958
Upgrade to Spring Authorization Server 1.4.3
snicoll Apr 23, 2025
de7c020
Upgrade to Spring Integration 6.4.4
snicoll Apr 23, 2025
0818e64
Upgrade to Spring Kafka 3.3.5
snicoll Apr 23, 2025
c26db59
Upgrade to Spring Pulsar 1.2.5
snicoll Apr 23, 2025
20d26c0
Upgrade to Spring Session 3.4.3
snicoll Apr 23, 2025
1e33d63
Merge branch '3.3.x' into 3.4.x
snicoll Apr 23, 2025
c2f8331
Fix reference to JPA entity in LiquibaseAutoConfigurationTests
snicoll Apr 23, 2025
167c8ca
Add an explicit note about having to enable cache metrics
snicoll Apr 23, 2025
7800d24
Merge branch '3.3.x' into 3.4.x
snicoll Apr 23, 2025
3531071
Polish 'Refactor ApplicationResourceLoader `preferFileResolution` sup…
philwebb Apr 23, 2025
55f67c9
Fix potential null problem in actuator
mhalbritter Apr 24, 2025
46a709a
Merge branch '3.3.x' into 3.4.x
mhalbritter Apr 24, 2025
016b3de
Upgrade to Netty 4.1.120.Final
snicoll Apr 24, 2025
933572a
Upgrade to Netty 4.1.120.Final
snicoll Apr 24, 2025
d24a38f
Merge branch '3.3.x' into 3.4.x
snicoll Apr 24, 2025
d2eaac6
Revert "Upgrade to Netty 4.1.120.Final"
mhalbritter Apr 24, 2025
71acf93
Merge branch '3.3.x' into 3.4.x
mhalbritter Apr 24, 2025
ab0c332
Next development version (v3.3.12-SNAPSHOT)
mhalbritter Apr 24, 2025
918066f
Merge branch '3.3.x' into 3.4.x
mhalbritter Apr 24, 2025
ea00325
Next development version (v3.4.6-SNAPSHOT)
wilkinsona Apr 24, 2025
52c0e0a
Ensure resolved bom is available before using it for Javadoc links
wilkinsona Apr 24, 2025
611240c
Merge branch '3.3.x' into 3.4.x
wilkinsona Apr 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.4.5-SNAPSHOT
version=3.4.6-SNAPSHOT
latestVersion=false
spring.build-type=oss

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ protected final List<ServerWebExchangeMatcher> getDelegateMatchers(Set<String> p
}

private PathPatternParserServerWebExchangeMatcher getDelegateMatcher(String path) {
Assert.notNull(path, "'path' must not be null");
return new PathPatternParserServerWebExchangeMatcher(path + "/**");
}

Expand Down Expand Up @@ -310,11 +311,18 @@ protected ServerWebExchangeMatcher createDelegate(PathMappedEndpoints endpoints)
if (this.includeLinks && StringUtils.hasText(endpoints.getBasePath())) {
delegateMatchers.add(new LinksServerWebExchangeMatcher());
}
if (delegateMatchers.isEmpty()) {
return EMPTY_MATCHER;
}
return new OrServerWebExchangeMatcher(delegateMatchers);
}

private Stream<String> streamPaths(List<Object> source, PathMappedEndpoints endpoints) {
return source.stream().filter(Objects::nonNull).map(this::getEndpointId).map(endpoints::getPath);
return source.stream()
.filter(Objects::nonNull)
.map(this::getEndpointId)
.map(endpoints::getPath)
.filter(Objects::nonNull);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,18 @@ protected RequestMatcher createDelegate(WebApplicationContext context,
if (this.includeLinks && StringUtils.hasText(basePath)) {
delegateMatchers.addAll(getLinksMatchers(requestMatcherFactory, matcherProvider, basePath));
}
if (delegateMatchers.isEmpty()) {
return EMPTY_MATCHER;
}
return new OrRequestMatcher(delegateMatchers);
}

private Stream<String> streamPaths(List<Object> source, PathMappedEndpoints endpoints) {
return source.stream().filter(Objects::nonNull).map(this::getEndpointId).map(endpoints::getPath);
return source.stream()
.filter(Objects::nonNull)
.map(this::getEndpointId)
.map(endpoints::getPath)
.filter(Objects::nonNull);
}

@Override
Expand Down Expand Up @@ -435,6 +442,7 @@ private static final class RequestMatcherFactory {
RequestMatcher antPath(RequestMatcherProvider matcherProvider, String... parts) {
StringBuilder pattern = new StringBuilder();
for (String part : parts) {
Assert.notNull(part, "'part' must not be null");
pattern.append(part);
}
return matcherProvider.getRequestMatcher(pattern.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ static class CustomH2Driver extends org.h2.Driver {
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence https://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="manually-configured">
<class>org.springframework.boot.autoconfigure.flyway.FlywayAutoConfigurationTests$City</class>
<class>org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfigurationTests$City</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
</persistence>
Expand Down
10 changes: 5 additions & 5 deletions spring-boot-project/spring-boot-dependencies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ bom {
releaseNotes("https://github.com/spring-projects/spring-amqp/releases/tag/v{version}")
}
}
library("Spring Authorization Server", "1.4.3-SNAPSHOT") {
library("Spring Authorization Server", "1.4.3") {
considerSnapshots()
group("org.springframework.security") {
modules = [
Expand Down Expand Up @@ -2160,7 +2160,7 @@ bom {
releaseNotes("https://github.com/spring-projects/spring-hateoas/releases/tag/{version}")
}
}
library("Spring Integration", "6.4.4-SNAPSHOT") {
library("Spring Integration", "6.4.4") {
considerSnapshots()
group("org.springframework.integration") {
bom("spring-integration-bom")
Expand All @@ -2175,7 +2175,7 @@ bom {
releaseNotes("https://github.com/spring-projects/spring-integration/releases/tag/v{version}")
}
}
library("Spring Kafka", "3.3.5-SNAPSHOT") {
library("Spring Kafka", "3.3.5") {
considerSnapshots()
group("org.springframework.kafka") {
modules = [
Expand Down Expand Up @@ -2213,7 +2213,7 @@ bom {
releaseNotes("https://github.com/spring-projects/spring-ldap/releases/tag/{version}")
}
}
library("Spring Pulsar", "1.2.5-SNAPSHOT") {
library("Spring Pulsar", "1.2.5") {
considerSnapshots()
group("org.springframework.pulsar") {
bom("spring-pulsar-bom")
Expand Down Expand Up @@ -2271,7 +2271,7 @@ bom {
releaseNotes("https://github.com/spring-projects/spring-security/releases/tag/{version}")
}
}
library("Spring Session", "3.4.3-SNAPSHOT") {
library("Spring Session", "3.4.3") {
considerSnapshots()
prohibit {
startsWith(["Apple-", "Bean-", "Corn-", "Dragonfruit-"])
Expand Down
1 change: 1 addition & 0 deletions spring-boot-project/spring-boot-docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ dokkatoo {
}

def aggregatedJavadoc = tasks.register('aggregatedJavadoc', Javadoc) {
dependsOn configurations.resolvedBom
destinationDir = project.file(project.layout.buildDirectory.dir("docs/javadoc"))
options {
author = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,9 @@ The following cache libraries are supported:
* Any compliant JCache (JSR-107) implementation
* Redis

WARNING: Metrics should be enabled for the auto-configuration to pick them up.
Refer to the documentation of the cache library you are using for more details.

Metrics are tagged by the name of the cache and by the name of the javadoc:org.springframework.cache.CacheManager[], which is derived from the bean name.

NOTE: Only caches that are configured on startup are bound to the registry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static ResourceLoader get(ResourceLoader resourceLoader) {
* class loader at the time this call is made.
* @param resourceLoader the delegate resource loader
* @param preferFileResolution if file based resolution is preferred when a suitable
* {@link ResourceFilePathResolver} support the resource
* {@link FilePathResolver} support the resource
* @return a {@link ResourceLoader} instance
* @since 3.4.1
*/
Expand Down Expand Up @@ -160,8 +160,8 @@ private static ResourceLoader get(ResourceLoader resourceLoader, SpringFactories
Assert.notNull(resourceLoader, "'resourceLoader' must not be null");
Assert.notNull(springFactoriesLoader, "'springFactoriesLoader' must not be null");
List<ProtocolResolver> protocolResolvers = springFactoriesLoader.load(ProtocolResolver.class);
List<ResourceFilePathResolver> filePathResolvers = (preferFileResolution)
? springFactoriesLoader.load(ResourceFilePathResolver.class) : Collections.emptyList();
List<FilePathResolver> filePathResolvers = (preferFileResolution)
? springFactoriesLoader.load(FilePathResolver.class) : Collections.emptyList();
return new ProtocolResolvingResourceLoader(resourceLoader, protocolResolvers, filePathResolvers);
}

Expand All @@ -188,6 +188,28 @@ static ResourceLoader get(ClassLoader classLoader) {

}

/**
* Strategy interface registered in {@code spring.factories} and used by
* {@link ApplicationResourceLoader} to determine the file path of loaded resource
* when it can also be represented as a {@link FileSystemResource}.
*
* @author Phillip Webb
* @since 3.4.5
*/
public interface FilePathResolver {

/**
* Return the {@code path} of the given resource if it can also be represented as
* a {@link FileSystemResource}.
* @param location the location used to create the resource
* @param resource the resource to check
* @return the file path of the resource or {@code null} if the it is not possible
* to represent the resource as a {@link FileSystemResource}.
*/
String resolveFilePath(String location, Resource resource);

}

/**
* An application {@link Resource}.
*/
Expand All @@ -214,10 +236,10 @@ private static class ProtocolResolvingResourceLoader implements ResourceLoader {

private final List<ProtocolResolver> protocolResolvers;

private final List<ResourceFilePathResolver> filePathResolvers;
private final List<FilePathResolver> filePathResolvers;

ProtocolResolvingResourceLoader(ResourceLoader resourceLoader, List<ProtocolResolver> protocolResolvers,
List<ResourceFilePathResolver> filePathResolvers) {
List<FilePathResolver> filePathResolvers) {
this.resourceLoader = resourceLoader;
this.protocolResolvers = protocolResolvers;
this.filePathResolvers = filePathResolvers;
Expand All @@ -239,12 +261,12 @@ public Resource getResource(String location) {
}
}
Resource resource = this.resourceLoader.getResource(location);
String fileSystemPath = getFileSystemPath(location, resource);
return (fileSystemPath != null) ? new ApplicationResource(fileSystemPath) : resource;
String filePath = getFilePath(location, resource);
return (filePath != null) ? new ApplicationResource(filePath) : resource;
}

private String getFileSystemPath(String location, Resource resource) {
for (ResourceFilePathResolver filePathResolver : this.filePathResolvers) {
private String getFilePath(String location, Resource resource) {
for (FilePathResolver filePathResolver : this.filePathResolvers) {
String filePath = filePathResolver.resolveFilePath(location, resource);
if (filePath != null) {
return filePath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@

package org.springframework.boot.io;

import org.springframework.boot.io.ApplicationResourceLoader.FilePathResolver;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;

/**
* {@link ResourceFilePathResolver} for {@link ClassPathResource}.
* {@link FilePathResolver} for {@link ClassPathResource}.
*
* @author Phillip Webb
*/
class ClassPathResourceFilePathResolver implements ResourceFilePathResolver {
class ClassPathResourceFilePathResolver implements ApplicationResourceLoader.FilePathResolver {

@Override
public String resolveFilePath(String location, Resource resource) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@

package org.springframework.boot.web.context;

import org.springframework.boot.io.ResourceFilePathResolver;
import org.springframework.boot.io.ApplicationResourceLoader;
import org.springframework.boot.io.ApplicationResourceLoader.FilePathResolver;
import org.springframework.core.io.Resource;
import org.springframework.util.ClassUtils;
import org.springframework.web.context.support.ServletContextResource;

/**
* {@link ResourceFilePathResolver} for {@link ServletContextResource}.
* {@link FilePathResolver} for {@link ServletContextResource}.
*
* @author Phillip Webb
*/
class ServletContextResourceFilePathResolver implements ResourceFilePathResolver {
class ServletContextResourceFilePathResolver implements ApplicationResourceLoader.FilePathResolver {

private static final String RESOURCE_CLASS_NAME = "org.springframework.web.context.support.ServletContextResource";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@

package org.springframework.boot.web.reactive.context;

import org.springframework.boot.io.ResourceFilePathResolver;
import org.springframework.boot.io.ApplicationResourceLoader;
import org.springframework.boot.io.ApplicationResourceLoader.FilePathResolver;
import org.springframework.core.io.Resource;

/**
* {@link ResourceFilePathResolver} for {@link FilteredReactiveWebContextResource}.
* {@link FilePathResolver} for {@link FilteredReactiveWebContextResource}.
*
* @author Dmytro Nosan
*/
class FilteredReactiveWebContextResourceFilePathResolver implements ResourceFilePathResolver {
class FilteredReactiveWebContextResourceFilePathResolver implements ApplicationResourceLoader.FilePathResolver {

@Override
public String resolveFilePath(String location, Resource resource) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ org.springframework.core.io.ProtocolResolver=\
org.springframework.boot.io.Base64ProtocolResolver

# Resource File Path Resolvers
org.springframework.boot.io.ResourceFilePathResolver=\
org.springframework.boot.io.ApplicationResourceLoader$FilePathResolver=\
org.springframework.boot.io.ClassPathResourceFilePathResolver,\
org.springframework.boot.web.context.ServletContextResourceFilePathResolver,\
org.springframework.boot.web.reactive.context.FilteredReactiveWebContextResourceFilePathResolver