Replace @Controller with @RestController

See gh-1401
This commit is contained in:
rijusougata13 2023-04-04 20:47:38 +05:30 committed by Stephane Nicoll
parent 83649e483a
commit 1dd4ddf4dc
4 changed files with 4 additions and 5 deletions

View File

@ -39,7 +39,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
*
* @author Stephane Nicoll
*/
@Controller
@RestController
public class CommandLineMetadataController extends AbstractMetadataController {
private final CommandLineHelpGenerator commandLineHelpGenerator;

View File

@ -65,7 +65,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* @param <R> the {@link ProjectRequest} type to use to bind request parameters
* @author Stephane Nicoll
*/
@Controller
@RestController
public abstract class ProjectGenerationController<R extends ProjectRequest> {
private static final Log logger = LogFactory.getLog(ProjectGenerationController.class);

View File

@ -50,7 +50,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
*
* @author Stephane Nicoll
*/
@Controller
@RestController
public class ProjectMetadataController extends AbstractMetadataController {
/**
@ -67,7 +67,6 @@ public class ProjectMetadataController extends AbstractMetadataController {
}
@RequestMapping(path = "/metadata/config", produces = "application/json")
@ResponseBody
public InitializrMetadata config() {
return this.metadataProvider.get();
}

View File

@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
*
* @author Stephane Nicoll
*/
@Controller
@RestController
public class SpringCliDistributionController {
private final InitializrMetadataProvider metadataProvider;