mirror of
https://gitee.com/dcren/initializr.git
synced 2025-10-21 11:07:37 +08:00
Polish "Replace @Controller with @RestController"
See gh-1401
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
*/
|
||||
|
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@RestController
|
||||
@Controller
|
||||
public class SpringCliDistributionController {
|
||||
|
||||
private final InitializrMetadataProvider metadataProvider;
|
||||
|
Reference in New Issue
Block a user