Compare commits

...

20 Commits
v4.0.0 ... main

Author SHA1 Message Date
Andy Wilkinson 4b8db9b630 Fix problems with auto-configuration architecture checks
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48216
2025-11-21 16:57:56 +00:00
Andy Wilkinson 85bbbc99ad Merge branch '3.5.x'
Closes gh-48229
2025-11-21 16:54:25 +00:00
Andy Wilkinson 01d93513c7 Merge branch '3.4.x' into 3.5.x
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48226
2025-11-21 16:47:11 +00:00
Andy Wilkinson 40453e76f0 Merge branch '3.5.x'
Closes gh-48228
2025-11-21 16:47:00 +00:00
Andy Wilkinson 7459fe0163 Merge branch '3.4.x' into 3.5.x
Closes gh-48227
2025-11-21 16:46:26 +00:00
Andy Wilkinson 859606ae13 Split architecture checks by language as well as source set
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48224
2025-11-21 16:44:54 +00:00
Andy Wilkinson fc8f9a322d Annotation Kotlin auto-config examples with @AutoConfiguration
Closes gh-48220
2025-11-21 16:44:54 +00:00
Stéphane Nicoll bd5264e28e Merge branch '3.5.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48219
2025-11-21 13:02:14 +01:00
Stéphane Nicoll d4408ab9cd Merge pull request #48169 from vpavic
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
* pr/48169:
  Polish "Revise "Use Liquibase for test-only migrations" section"
  Revise "Use Liquibase for test-only migrations" section

Closes gh-48169
2025-11-21 13:02:09 +01:00
Stéphane Nicoll 1650092890 Polish "Revise "Use Liquibase for test-only migrations" section"
See gh-48169
2025-11-21 12:05:42 +01:00
Vedran Pavic 7bc6ebc169 Revise "Use Liquibase for test-only migrations" section
See gh-48169

Signed-off-by: Vedran Pavic <vedran@vedranpavic.com>
2025-11-21 12:03:29 +01:00
Stéphane Nicoll 1e96c6cd02 Merge branch '3.5.x'
Closes gh-48218
2025-11-21 11:27:56 +01:00
Stéphane Nicoll 2f27912aea Merge branch '3.4.x' into 3.5.x
Closes gh-48217
2025-11-21 11:27:45 +01:00
Stéphane Nicoll 5bb8d711ce Refer to Infinispan documentation
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Rather than documenting what should be added to use Infinispan as a
cache provider, this commit adds a reference to the official
documentation.

Closes gh-48191
2025-11-21 11:23:40 +01:00
Stéphane Nicoll 977be74768 Document replacement for removed "max-retries" properties
See gh-48023
Closes gh-48206
2025-11-21 10:59:42 +01:00
Phillip Webb 0f4de3c4f4 Merge branch '3.5.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48212
2025-11-20 14:18:32 -08:00
Phillip Webb 39c0d17b87 Merge branch '3.4.x' into 3.5.x
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48211
2025-11-20 14:18:11 -08:00
Phillip Webb 4d94fcba9a Upgrade to Antora Spring UI v0.4.24
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:24], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48210
2025-11-20 14:17:47 -08:00
Andy Wilkinson 0884005212 Generate individual modules' javadoc without web fonts
Closes gh-48208
2025-11-20 19:57:14 +00:00
Phillip Webb 384e8b9b74 Next development version (v4.0.1-SNAPSHOT) 2025-11-20 10:38:42 -08:00
14 changed files with 110 additions and 70 deletions

View File

@ -13,6 +13,6 @@
"@springio/asciidoctor-extensions": "1.0.0-alpha.17" "@springio/asciidoctor-extensions": "1.0.0-alpha.17"
}, },
"config": { "config": {
"ui-bundle-url": "https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.21/ui-bundle.zip" "ui-bundle-url": "https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.24/ui-bundle.zip"
} }
} }

View File

@ -230,10 +230,18 @@ class JavaConventions {
CoreJavadocOptions options = (CoreJavadocOptions) javadoc.getOptions(); CoreJavadocOptions options = (CoreJavadocOptions) javadoc.getOptions();
options.source("17"); options.source("17");
options.encoding("UTF-8"); options.encoding("UTF-8");
options.addStringOption("Xdoclint:none", "-quiet"); addValuelessOption(options, "Xdoclint:none");
addValuelessOption(options, "quiet");
if (!javadoc.getName().contains("aggregated")) {
addValuelessOption(options, "-no-fonts");
}
}); });
} }
private void addValuelessOption(CoreJavadocOptions options, String option) {
options.addMultilineMultiValueOption(option).setValue(List.of(Collections.emptyList()));
}
private void configureJavaConventions(Project project) { private void configureJavaConventions(Project project) {
if (!project.hasProperty("toolchainVersion")) { if (!project.hasProperty("toolchainVersion")) {
JavaPluginExtension javaPluginExtension = project.getExtensions().getByType(JavaPluginExtension.class); JavaPluginExtension javaPluginExtension = project.getExtensions().getByType(JavaPluginExtension.class);

View File

@ -16,17 +16,17 @@
package org.springframework.boot.build.architecture; package org.springframework.boot.build.architecture;
import java.util.ArrayList; import java.util.Collections;
import java.util.List;
import org.gradle.api.Plugin; import org.gradle.api.Plugin;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.gradle.api.Task;
import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginExtension; import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.tasks.SourceSet; import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.TaskProvider; import org.gradle.api.tasks.TaskProvider;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.language.base.plugins.LifecycleBasePlugin; import org.gradle.language.base.plugins.LifecycleBasePlugin;
import org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -46,28 +46,45 @@ public class ArchitecturePlugin implements Plugin<Project> {
private void registerTasks(Project project, ArchitectureCheckExtension extension) { private void registerTasks(Project project, ArchitectureCheckExtension extension) {
JavaPluginExtension javaPluginExtension = project.getExtensions().getByType(JavaPluginExtension.class); JavaPluginExtension javaPluginExtension = project.getExtensions().getByType(JavaPluginExtension.class);
List<TaskProvider<ArchitectureCheck>> packageTangleChecks = new ArrayList<>();
for (SourceSet sourceSet : javaPluginExtension.getSourceSets()) { for (SourceSet sourceSet : javaPluginExtension.getSourceSets()) {
TaskProvider<ArchitectureCheck> checkPackageTangles = project.getTasks() registerArchitectureCheck(sourceSet, "java", project).configure((task) -> {
.register("checkArchitecture" + StringUtils.capitalize(sourceSet.getName()), ArchitectureCheck.class, task.setClasses(project.files(project.getTasks()
(task) -> { .named(sourceSet.getCompileTaskName("java"), JavaCompile.class)
task.getSourceSet().set(sourceSet.getName()); .flatMap((compile) -> compile.getDestinationDirectory())));
task.getCompileClasspath().from(sourceSet.getCompileClasspath());
task.setClasses(sourceSet.getOutput().getClassesDirs());
task.getResourcesDirectory().set(sourceSet.getOutput().getResourcesDir());
task.dependsOn(sourceSet.getProcessResourcesTaskName());
task.setDescription("Checks the architecture of the classes of the " + sourceSet.getName()
+ " source set.");
task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);
task.getNullMarkedEnabled().set(extension.getNullMarked().getEnabled()); task.getNullMarkedEnabled().set(extension.getNullMarked().getEnabled());
task.getNullMarkedIgnoredPackages().set(extension.getNullMarked().getIgnoredPackages()); task.getNullMarkedIgnoredPackages().set(extension.getNullMarked().getIgnoredPackages());
}); });
packageTangleChecks.add(checkPackageTangles); project.getPlugins()
} .withId("org.jetbrains.kotlin.jvm",
if (!packageTangleChecks.isEmpty()) { (kotlinPlugin) -> registerArchitectureCheck(sourceSet, "kotlin", project).configure((task) -> {
TaskProvider<Task> checkTask = project.getTasks().named(LifecycleBasePlugin.CHECK_TASK_NAME); task.setClasses(project.files(project.getTasks()
checkTask.configure((check) -> check.dependsOn(packageTangleChecks)); .named(sourceSet.getCompileTaskName("kotlin"), KotlinCompileTool.class)
.flatMap((compile) -> compile.getDestinationDirectory())));
task.getNullMarkedEnabled().set(false);
task.getNullMarkedIgnoredPackages().set(Collections.emptySet());
}));
} }
} }
private TaskProvider<ArchitectureCheck> registerArchitectureCheck(SourceSet sourceSet, String language,
Project project) {
TaskProvider<ArchitectureCheck> checkArchitecture = project.getTasks()
.register(
"checkArchitecture"
+ StringUtils.capitalize(sourceSet.getName() + StringUtils.capitalize(language)),
ArchitectureCheck.class, (task) -> {
task.getSourceSet().set(sourceSet.getName());
task.getCompileClasspath().from(sourceSet.getCompileClasspath());
task.getResourcesDirectory().set(sourceSet.getOutput().getResourcesDir());
task.dependsOn(sourceSet.getProcessResourcesTaskName());
task.setDescription("Checks the architecture of the " + language + " classes of the "
+ sourceSet.getName() + " source set.");
task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);
});
project.getTasks()
.named(LifecycleBasePlugin.CHECK_TASK_NAME)
.configure((check) -> check.dependsOn(checkArchitecture));
return checkArchitecture;
}
} }

View File

@ -421,6 +421,8 @@ final class ArchitectureRules {
return ArchRuleDefinition.members() return ArchRuleDefinition.members()
.that() .that()
.areDeclaredInClassesThat(areRegularAutoConfiguration()) .areDeclaredInClassesThat(areRegularAutoConfiguration())
.and()
.areDeclaredInClassesThat(areNotKotlinClasses())
.and(areNotDefaultConstructors()) .and(areNotDefaultConstructors())
.and(areNotConstants()) .and(areNotConstants())
.and(dontOverridePublicMethods()) .and(dontOverridePublicMethods())
@ -440,13 +442,18 @@ final class ArchitectureRules {
} }
static DescribedPredicate<JavaClass> areRegularAutoConfiguration() { static DescribedPredicate<JavaClass> areRegularAutoConfiguration() {
return DescribedPredicate.describe("Regular @AutoConfiguration", return DescribedPredicate.describe("are regular @AutoConfiguration",
(javaClass) -> javaClass.isAnnotatedWith(AUTOCONFIGURATION_ANNOTATION) (javaClass) -> javaClass.isAnnotatedWith(AUTOCONFIGURATION_ANNOTATION)
&& !javaClass.getName().contains("TestAutoConfiguration") && !javaClass.isAnnotation()); && !javaClass.getName().contains("TestAutoConfiguration") && !javaClass.isAnnotation());
} }
static DescribedPredicate<JavaClass> areNotKotlinClasses() {
return DescribedPredicate.describe("are not Kotlin classes",
(javaClass) -> !javaClass.isAnnotatedWith("kotlin.Metadata"));
}
static DescribedPredicate<JavaClass> areTestAutoConfiguration() { static DescribedPredicate<JavaClass> areTestAutoConfiguration() {
return DescribedPredicate.describe("Test @AutoConfiguration", return DescribedPredicate.describe("are test @AutoConfiguration",
(javaClass) -> javaClass.isAnnotatedWith(AUTOCONFIGURATION_ANNOTATION) (javaClass) -> javaClass.isAnnotatedWith(AUTOCONFIGURATION_ANNOTATION)
&& javaClass.getName().contains("TestAutoConfiguration") && !javaClass.isAnnotation()); && javaClass.getName().contains("TestAutoConfiguration") && !javaClass.isAnnotation());
} }

View File

@ -31,12 +31,16 @@ import org.springframework.util.ReflectionUtils;
/** /**
* Finds all configurations from auto-configurations (either nested configurations or * Finds all configurations from auto-configurations (either nested configurations or
* imported ones) and checks that these classes don't contain public members. * imported ones) and checks that these classes don't contain public members.
* <p>
* Kotlin classes are ignored as Kotlin does not have package-private visibility and
* {@code internal} isn't a good substitute.
* *
* @author Moritz Halbritter * @author Moritz Halbritter
*/ */
class AutoConfigurationChecker { class AutoConfigurationChecker {
private final DescribedPredicate<JavaClass> isAutoConfiguration = ArchitectureRules.areRegularAutoConfiguration(); private final DescribedPredicate<JavaClass> isAutoConfiguration = ArchitectureRules.areRegularAutoConfiguration()
.and(ArchitectureRules.areNotKotlinClasses());
EvaluationResult check(JavaClasses javaClasses) { EvaluationResult check(JavaClasses javaClasses) {
AutoConfigurations autoConfigurations = new AutoConfigurations(); AutoConfigurations autoConfigurations = new AutoConfigurations();

View File

@ -423,7 +423,7 @@ class ArchitectureCheckTests {
@Override @Override
public String toString() { public String toString() {
return "checkArchitecture" + StringUtils.capitalize(this.sourceSetName); return "checkArchitecture" + StringUtils.capitalize(this.sourceSetName) + "Java";
} }
} }

View File

@ -207,41 +207,20 @@ This file will not be packaged in your uber jar or your container.
[[howto.data-initialization.migration-tool.liquibase-tests]] [[howto.data-initialization.migration-tool.liquibase-tests]]
=== Use Liquibase for Test-only Migrations === Use Liquibase for Test-only Migrations
If you want to create Liquibase migrations which populate your test database, you have to create a test changelog which also includes the production changelog. If you want to create Liquibase migrations which populate your test database, you can leverage https://docs.liquibase.com/reference-guide/changelog-attributes/what-are-contexts[Liquibase contexts].
See also the related https://www.liquibase.com/blog/contexts-vs-labels[blog post].
First, you need to configure Liquibase to use a different changelog when running the tests. In practical terms, this translates into adding a `context:@test` attribute to changesets containing test data, for example:
One way to do this is to create a Spring Boot `test` profile and put the Liquibase properties in there.
For that, create a file named `src/test/resources/application-test.properties` and put the following property in there:
[configprops,yaml] [source,sql]
---- ----
spring: --liquibase formatted sql
liquibase:
change-log: "classpath:/db/changelog/db.changelog-test.yaml" --changeset alice:1 context:@test
insert into project (id, name) values (1, 'Spring Boot');
---- ----
This configures Liquibase to use a different changelog when running in the `test` profile. And using `spring.liquibase.contexts=test` in environments where you would like changesets containing test data to be applied.
Now create the changelog file at `src/test/resources/db/changelog/db.changelog-test.yaml`:
[source,yaml]
----
databaseChangeLog:
- include:
file: classpath:/db/changelog/db.changelog-master.yaml
- changeSet:
runOrder: "last"
id: "test"
changes:
# Insert your changes here
----
This changelog will be used when the tests are run and it will not be packaged in your uber jar or your container.
It includes the production changelog and then declares a new changeset, whose `runOrder: last` setting specifies that it runs after all the production changesets have been run.
You can now use for example the https://docs.liquibase.com/change-types/insert.html[insert changeset] to insert data or the https://docs.liquibase.com/change-types/sql.html[sql changeset] to execute SQL directly.
The last thing to do is to configure Spring Boot to activate the `test` profile when running tests.
To do this, you can add the `@ActiveProfiles("test")` annotation to your javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation] annotated test classes.

View File

@ -142,10 +142,7 @@ spring:
Caches can be created on startup by setting the configprop:spring.cache.cache-names[] property. Caches can be created on startup by setting the configprop:spring.cache.cache-names[] property.
If a custom javadoc:org.infinispan.configuration.cache.ConfigurationBuilder[] bean is defined, it is used to customize the caches. If a custom javadoc:org.infinispan.configuration.cache.ConfigurationBuilder[] bean is defined, it is used to customize the caches.
To be compatible with Spring Boot's Jakarta EE 9 baseline, Infinispan's `-jakarta` modules must be used. For more details, see https://infinispan.org/docs/stable/titles/spring/spring.html[the documentation].
For every module with a `-jakarta` variant, the variant must be used in place of the standard module.
For example, `infinispan-core-jakarta` and `infinispan-commons-jakarta` must be used in place of `infinispan-core` and `infinispan-commons` respectively.
[[io.caching.provider.couchbase]] [[io.caching.provider.couchbase]]

View File

@ -30,11 +30,11 @@ public final class MyAutoConfiguration {
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@ConditionalOnClass(SomeService.class) @ConditionalOnClass(SomeService.class)
public static class SomeServiceConfiguration { static class SomeServiceConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
public SomeService someService() { SomeService someService() {
return new SomeService(); return new SomeService();
} }

View File

@ -16,11 +16,11 @@
package org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.beanconditions package org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.beanconditions
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@Configuration(proxyBeanMethods = false) @AutoConfiguration
class MyAutoConfiguration { class MyAutoConfiguration {
@Bean @Bean

View File

@ -16,12 +16,13 @@
package org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.classconditions package org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.classconditions
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Configuration
@Configuration(proxyBeanMethods = false) @AutoConfiguration
// Some conditions ... // Some conditions ...
class MyAutoConfiguration { class MyAutoConfiguration {

View File

@ -1,4 +1,4 @@
version=4.0.0-SNAPSHOT version=4.0.1-SNAPSHOT
latestVersion=true latestVersion=true
spring.build-type=oss spring.build-type=oss

View File

@ -32,7 +32,7 @@ dependencies {
} }
tasks.configureEach { tasks.configureEach {
if ("checkArchitectureMain".equals(it.name)) { if ("checkArchitectureMainJava".equals(it.name)) {
prohibitObjectsRequireNonNull = false prohibitObjectsRequireNonNull = false
} }
} }

View File

@ -13,6 +13,24 @@
"description": "Whether to create an AmqpAdmin bean.", "description": "Whether to create an AmqpAdmin bean.",
"defaultValue": true "defaultValue": true
}, },
{
"name": "spring.rabbitmq.listener.direct.retry.max-attempts",
"type": "java.lang.Long",
"deprecation": {
"level": "error",
"replacement": "spring.rabbitmq.listener.direct.retry.max-retries",
"since": "4.0.0"
}
},
{
"name": "spring.rabbitmq.listener.simple.retry.max-attempts",
"type": "java.lang.Long",
"deprecation": {
"level": "error",
"replacement": "spring.rabbitmq.listener.simple.retry.max-retries",
"since": "4.0.0"
}
},
{ {
"name": "spring.rabbitmq.listener.simple.transaction-size", "name": "spring.rabbitmq.listener.simple.transaction-size",
"type": "java.lang.Integer", "type": "java.lang.Integer",
@ -37,6 +55,15 @@
"level": "error", "level": "error",
"since": "2.2.0" "since": "2.2.0"
} }
},
{
"name": "spring.rabbitmq.template.retry.max-attempts",
"type": "java.lang.Long",
"deprecation": {
"level": "error",
"replacement": "spring.rabbitmq.template.retry.max-retries",
"since": "4.0.0"
}
} }
] ]
} }