From 9c9e04b8e42e45d3062a034fcacab01102de2049 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 23 Feb 2022 08:58:22 +0000 Subject: [PATCH] Use mainClass rather than deprecated main in BootRun examples Closes gh-29965 --- .../src/docs/gradle/running/boot-run-main.gradle | 4 ++-- .../src/docs/gradle/running/boot-run-main.gradle.kts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle index 3f3ab9e392..6c012eb2cf 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle @@ -5,12 +5,12 @@ plugins { // tag::main[] bootRun { - main = 'com.example.ExampleApplication' + mainClass = 'com.example.ExampleApplication' } // end::main[] task configuredMainClass { doLast { - println bootRun.main + println bootRun.mainClass } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts index 77d6bd64cd..68e946a3e5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/gradle/running/boot-run-main.gradle.kts @@ -7,12 +7,12 @@ plugins { // tag::main[] tasks.getByName("bootRun") { - main = "com.example.ExampleApplication" + mainClass.set("com.example.ExampleApplication") } // end::main[] task("configuredMainClass") { doLast { - println(tasks.getByName("bootRun").main) + println(tasks.getByName("bootRun").mainClass) } }