使用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.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
public class HelloController {
|
||||
|
||||
@ApiIgnore
|
||||
@RequestMapping(value = "/hello", method = RequestMethod.GET)
|
||||
public String index() {
|
||||
return "Hello World";
|
||||
|
||||
Reference in New Issue
Block a user