Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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.
Expand Down Expand Up @@ -60,6 +60,9 @@
* Checkstyle}, {@link TestFailuresPlugin Test Failures}, and {@link TestRetryPlugin Test
* Retry} plugins are applied
* <li>{@link Test} tasks are configured to use JUnit Platform and use a max heap of 1024M
* <li>A {@code testRuntimeOnly} dependency upon
* {@code org.junit.platform:junit-platform-launcher} is added to projects with the
* {@link JavaPlugin} applied
* <li>{@link JavaCompile}, {@link Javadoc}, and {@link FormatTask} tasks are configured
* to use UTF-8 encoding
* <li>{@link JavaCompile} tasks are configured to use {@code -parameters} and, when
Expand Down Expand Up @@ -146,6 +149,8 @@ private void configureTestConventions(Project project) {
test.useJUnitPlatform();
test.setMaxHeapSize("1024M");
});
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> project.getDependencies()
.add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, "org.junit.platform:junit-platform-launcher"));
project.getPlugins().apply(TestRetryPlugin.class);
project.getTasks().withType(Test.class,
(test) -> project.getPlugins().withType(TestRetryPlugin.class, (testRetryPlugin) -> {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ dependencies {
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.yaml:snakeyaml")

testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.springframework.security:spring-security-oauth2-jose")
testRuntimeOnly("org.springframework.security:spring-security-oauth2-resource-server")
testRuntimeOnly("org.springframework.security:spring-security-saml2-service-provider")
Expand Down
1 change: 0 additions & 1 deletion spring-boot-project/spring-boot-actuator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,5 @@ dependencies {
testRuntimeOnly("javax.xml.bind:jaxb-api")
testRuntimeOnly("org.apache.tomcat.embed:tomcat-embed-el")
testRuntimeOnly("org.glassfish.jersey.ext:jersey-spring5")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.hsqldb:hsqldb")
}
1 change: 0 additions & 1 deletion spring-boot-project/spring-boot-autoconfigure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,4 @@ dependencies {
testImplementation("org.yaml:snakeyaml")

testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
2 changes: 0 additions & 2 deletions spring-boot-project/spring-boot-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ dependencies {
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("org.springframework:spring-test")

testRuntimeOnly("org.junit.platform:junit-platform-launcher")

testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-amqp", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-aop", configuration: "mavenRepository"))
Expand Down
1 change: 0 additions & 1 deletion spring-boot-project/spring-boot-devtools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ dependencies {
testImplementation("org.thymeleaf:thymeleaf-spring5")
testImplementation("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect")

testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.yaml:snakeyaml")
}

Expand Down
7 changes: 6 additions & 1 deletion spring-boot-project/spring-boot-docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,24 @@ dependencies {
implementation(project(path: ":spring-boot-project:spring-boot-autoconfigure"))
implementation(project(path: ":spring-boot-project:spring-boot-test"))
implementation(project(path: ":spring-boot-project:spring-boot-test-autoconfigure"))
implementation("ch.qos.logback:logback-classic")
implementation("com.zaxxer:HikariCP")
implementation("io.micrometer:micrometer-core")
implementation("io.projectreactor.netty:reactor-netty-http")
implementation("io.undertow:undertow-core")
implementation("jakarta.annotation:jakarta.annotation-api")
implementation("jakarta.servlet:jakarta.servlet-api")
implementation("org.apache.commons:commons-dbcp2")
implementation("org.apache.kafka:kafka-streams")
implementation("org.apache.logging.log4j:log4j-to-slf4j")
implementation("org.apache.tomcat.embed:tomcat-embed-core")
implementation("org.assertj:assertj-core")
implementation("org.glassfish.jersey.core:jersey-server")
implementation("org.hibernate:hibernate-jcache")
implementation("org.slf4j:jul-to-slf4j")
implementation("org.springframework:spring-test")
implementation("org.springframework:spring-web")
implementation("org.springframework:spring-webmvc")
implementation("org.springframework:spring-webflux")
implementation("org.springframework.data:spring-data-couchbase")
implementation("org.springframework.data:spring-data-neo4j")
Expand All @@ -93,6 +98,7 @@ dependencies {
implementation("org.springframework.security:spring-security-config")
implementation("org.springframework.security:spring-security-web")
implementation("org.junit.jupiter:junit-jupiter")
implementation("org.yaml:snakeyaml")

mavenPluginDocumentation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-maven-plugin", configuration: "documentation"))

Expand All @@ -103,7 +109,6 @@ dependencies {

testRuntimeOnly(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
testRuntimeOnly("com.h2database:h2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.springframework:spring-jdbc")

testSlices(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "testSliceMetadata"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Deprecation can also be specified declaratively in code by adding the `@Deprecat
For instance, assume that the `app.acme.target` property was confusing and was renamed to `app.acme.name`.
The following example shows how to handle that situation:

[source,java,indent=0]
[source,java,pending-extract=true,indent=0]
----
@ConfigurationProperties("app.acme")
public class AcmeProperties {
Expand Down Expand Up @@ -343,7 +343,7 @@ The special `.keys` and `.values` suffixes must refer to the keys and the values

Assume a `sample.contexts` maps magic `String` values to an integer, as shown in the following example:

[source,java,indent=0]
[source,java,pending-extract=true,indent=0]
----
@ConfigurationProperties("sample")
public class SampleProperties {
Expand Down Expand Up @@ -762,7 +762,7 @@ The annotation processor also supports the use of the `@Data`, `@Getter`, and `@

Consider the following example:

[source,java,indent=0,subs="verbatim,attributes"]
[source,java,pending-extract=true,indent=0,subs="verbatim,attributes"]
----
@ConfigurationProperties(prefix="server")
public class ServerProperties {
Expand Down Expand Up @@ -799,7 +799,7 @@ Also, the annotation processor cannot auto-detect default values for ``Enum``s a
For cases where the default value could not be detected, <<configuration-metadata-additional-metadata,manual metadata>> should be provided.
Consider the following example:

[source,java,indent=0,subs="verbatim,quotes,attributes"]
[source,java,pending-extract=true,indent=0,subs="verbatim,quotes,attributes"]
----
@ConfigurationProperties(prefix = "acme.messaging")
public class MessagingProperties {
Expand Down Expand Up @@ -845,7 +845,7 @@ The annotation processor automatically considers inner classes as nested propert
Rather than documenting the `ip` and `port` at the root of the namespace, we could create a sub-namespace for it.
Consider the updated example:

[source,java,indent=0,subs="verbatim,quotes,attributes"]
[source,java,pending-extract=true,indent=0,subs="verbatim,quotes,attributes"]
----
@ConfigurationProperties(prefix="server")
public class ServerProperties {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
:github-issues: https://github.com/{github-repo}/issues/
:github-wiki: https://github.com/{github-repo}/wiki

:code-examples: ../main/java/org/springframework/boot/docs
:test-examples: ../test/java/org/springframework/boot/docs
:include: ../main/java/org/springframework/boot/docs
:include-springbootfeatures: {include}/springbootfeatures
:include-productionreadyfeatures: {include}/productionreadyfeatures
:include-howto: {include}/howto

:spring-boot-code: https://github.com/{github-repo}/tree/{github-tag}
:spring-boot-api: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/api
Expand Down Expand Up @@ -94,9 +96,6 @@
:spring-session: https://spring.io/projects/spring-session
:spring-webservices-docs: https://docs.spring.io/spring-ws/docs/{spring-webservices-version}/reference/




:ant-docs: https://ant.apache.org/manual
:dependency-management-plugin-code: https://github.com/spring-gradle-plugins/dependency-management-plugin
:gradle-docs: https://docs.gradle.org/current/userguide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ An exception is thrown if more than one candidate is found.
=== Example Repackage Implementation
The following example shows a typical repackage implementation:

[source,java,indent=0]
[source,java,pending-extract=true,indent=0]
----
Repackager repackager = new Repackager(sourceJarFile);
repackager.setBackupSource(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Process-scoped environment variables are language agnostic.

Environment variables do not always make for the easiest API, so Spring Boot automatically extracts them and flattens the data into properties that can be accessed through Spring's `Environment` abstraction, as shown in the following example:

[source,java,indent=0]
[source,java,pending-extract=true,indent=0]
----
@Component
class MyBean implements EnvironmentAware {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ If you run `mvn dependency:tree` again, you see that there are now a number of a
To finish our application, we need to create a single Java file.
By default, Maven compiles sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/Example.java` to contain the following code:

[source,java,indent=0]
[source,java,pending-extract=true,indent=0]
----
import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
Expand Down
Loading