From 38f62e7204f22964bc8268af44e037b20e1ede0c Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 15 Apr 2023 11:23:21 +0900 Subject: [PATCH] Remove doc on removed Groovy support See https://github.com/spring-projects/spring-boot/issues/34899 --- README.adoc | 52 +--------------------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/README.adoc b/README.adoc index e3b0e3f10..548b7903c 100644 --- a/README.adoc +++ b/README.adoc @@ -350,7 +350,7 @@ http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingl You can see them all https://github.com/spring-projects/spring-boot/tree/main/spring-boot-project/spring-boot-starters[here in source code]. -== JAR Support and Groovy Support +== JAR Support The last example showed how Spring Boot lets you wire beans that you may not be aware you need. It also showed how to turn on convenient management services. @@ -360,56 +360,6 @@ deployments but also lets you put together executable JARs, thanks to Spring Boo module. The various guides demonstrate this dual support through the `spring-boot-gradle-plugin` and `spring-boot-maven-plugin`. -On top of that, Spring Boot also has Groovy support, letting you build Spring MVC web -applications with as little as a single file. - -Create a new file called `app.groovy` and put the following code in it: - -==== -[source,java] ----- -@RestController -class ThisWillActuallyRun { - - @GetMapping("/") - String home() { - return "Hello, World!" - } - -} ----- -==== - -NOTE: It does not matter where the file is. You can even fit an application that small -inside a https://twitter.com/rob_winch/status/364871658483351552[single tweet]! - -Next, https://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#getting-started-installing-the-cli[install Spring Boot's CLI]. - -Run the Groovy application by running the following command: - -==== -[source,bash] ----- -$ spring run app.groovy ----- -==== - -NOTE: Shut down the previous application, to avoid a port collision. - -From a different terminal window, run the following curl command (shown with its output): - -==== -[source,bash] ----- -$ curl localhost:8080 -Hello, World! ----- -==== - -Spring Boot does this by dynamically adding key annotations to your code and using -http://www.groovy-lang.org/Grape[Groovy Grape] to pull down the libraries that are needed -to make the app run. - == Summary Congratulations! You built a simple web application with Spring Boot and learned how it