Polish "Replace @Controller with @RestController"

See gh-1401
This commit is contained in:
Stephane Nicoll
2023-04-06 13:13:55 +02:00
parent 1dd4ddf4dc
commit 7ed74b28eb
4 changed files with 8 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2023 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.
@@ -29,12 +29,12 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.ResponseEntity.BodyBuilder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* {@link Controller} that handles assistance for CLI support using a
* {@link RestController} that handles assistance for CLI support using a
* {@link CommandLineHelpGenerator}.
*
* @author Stephane Nicoll

View File

@@ -51,16 +51,16 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* Base {@link Controller} that provides endpoints for project generation.
* Base {@link RestController} that provides endpoints for project generation.
*
* @param <R> the {@link ProjectRequest} type to use to bind request parameters
* @author Stephane Nicoll

View File

@@ -39,14 +39,13 @@ import org.springframework.http.CacheControl;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
* {@link Controller} that exposes metadata and service configuration.
* {@link RestController} that exposes metadata and service configuration.
*
* @author Stephane Nicoll
*/

View File

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