|
@@ -1,20 +1,13 @@
|
|
|
package cn.metaq.example;
|
|
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import springfox.documentation.oas.annotations.EnableOpenApi;
|
|
|
|
|
|
@EnableOpenApi
|
|
|
@SpringBootApplication
|
|
|
public class SpringBootSwagger3ExampleApplication {
|
|
|
|
|
|
- @ApiOperation(value = "测试swagger的模拟接口")
|
|
|
- @GetMapping("index")
|
|
|
- public String index(){
|
|
|
- return "success";
|
|
|
- }
|
|
|
public static void main(String[] args) {
|
|
|
SpringApplication.run(SpringBootSwagger3ExampleApplication.class, args);
|
|
|
}
|