mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Replace @Controller with @RestController
See gh-1401
This commit is contained in:
parent
83649e483a
commit
1dd4ddf4dc
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@Controller
|
||||
@RestController
|
||||
public class SpringCliDistributionController {
|
||||
|
||||
private final InitializrMetadataProvider metadataProvider;
|
||||
|
Loading…
Reference in New Issue
Block a user