使用swagger构建restful api
This commit is contained in:
@@ -3,6 +3,7 @@ package com.didispace.web;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RestController
|
@RestController
|
||||||
public class HelloController {
|
public class HelloController {
|
||||||
|
|
||||||
|
@ApiIgnore
|
||||||
@RequestMapping(value = "/hello", method = RequestMethod.GET)
|
@RequestMapping(value = "/hello", method = RequestMethod.GET)
|
||||||
public String index() {
|
public String index() {
|
||||||
return "Hello World";
|
return "Hello World";
|
||||||
|
|||||||
Reference in New Issue
Block a user