From b3e7c474ceb9844bf8014b16cf358f6eb74bca4a Mon Sep 17 00:00:00 2001 From: rijusougata13 Date: Tue, 4 Apr 2023 20:47:38 +0530 Subject: [PATCH] Replace @Controller with @RestController --- .../web/controller/CommandLineMetadataController.java | 2 +- .../initializr/web/controller/ProjectGenerationController.java | 2 +- .../initializr/web/controller/ProjectMetadataController.java | 3 +-- .../web/controller/SpringCliDistributionController.java | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/initializr-web/src/main/java/io/spring/initializr/web/controller/CommandLineMetadataController.java b/initializr-web/src/main/java/io/spring/initializr/web/controller/CommandLineMetadataController.java index 4f7e9d0df3..d8364a408d 100644 --- a/initializr-web/src/main/java/io/spring/initializr/web/controller/CommandLineMetadataController.java +++ b/initializr-web/src/main/java/io/spring/initializr/web/controller/CommandLineMetadataController.java @@ -39,7 +39,7 @@ * * @author Stephane Nicoll */ -@Controller +@RestController public class CommandLineMetadataController extends AbstractMetadataController { private final CommandLineHelpGenerator commandLineHelpGenerator; diff --git a/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectGenerationController.java b/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectGenerationController.java index 720da5a45a..78711ed7fb 100644 --- a/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectGenerationController.java +++ b/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectGenerationController.java @@ -65,7 +65,7 @@ * @param the {@link ProjectRequest} type to use to bind request parameters * @author Stephane Nicoll */ -@Controller +@RestController public abstract class ProjectGenerationController { private static final Log logger = LogFactory.getLog(ProjectGenerationController.class); diff --git a/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectMetadataController.java b/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectMetadataController.java index 110b29d2ec..3cc0557fdc 100644 --- a/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectMetadataController.java +++ b/initializr-web/src/main/java/io/spring/initializr/web/controller/ProjectMetadataController.java @@ -50,7 +50,7 @@ * * @author Stephane Nicoll */ -@Controller +@RestController public class ProjectMetadataController extends AbstractMetadataController { /** @@ -67,7 +67,6 @@ public ProjectMetadataController(InitializrMetadataProvider metadataProvider, } @RequestMapping(path = "/metadata/config", produces = "application/json") - @ResponseBody public InitializrMetadata config() { return this.metadataProvider.get(); } diff --git a/initializr-web/src/main/java/io/spring/initializr/web/controller/SpringCliDistributionController.java b/initializr-web/src/main/java/io/spring/initializr/web/controller/SpringCliDistributionController.java index 01014d5287..c302afc8e6 100644 --- a/initializr-web/src/main/java/io/spring/initializr/web/controller/SpringCliDistributionController.java +++ b/initializr-web/src/main/java/io/spring/initializr/web/controller/SpringCliDistributionController.java @@ -26,7 +26,7 @@ * * @author Stephane Nicoll */ -@Controller +@RestController public class SpringCliDistributionController { private final InitializrMetadataProvider metadataProvider;