feat: aos-swagger模块开发完成
This commit is contained in:
@@ -28,9 +28,17 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aos</groupId>
|
||||
<artifactId>aos-nacos</artifactId>
|
||||
<artifactId>aos-swagger</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.aos.test;
|
||||
|
||||
import com.aos.swagger.enable.EnableSwagger;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableSwagger(applicationName = "test", scanPackagesPath = "com.aos.test")
|
||||
@EnableConfigurationProperties
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.aos.test.web;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author: zouyang
|
||||
* @date: 2022/6/1
|
||||
* @description: 需求计划入口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/")
|
||||
@Api(value = "ActivityDemandController", tags = "需求计划入口")
|
||||
public class ActivityDemandController {
|
||||
|
||||
@PostMapping("/getListPage")
|
||||
@ApiOperation(value = "分页查询活动需求")
|
||||
public String getListPage() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@PostMapping("/getListPage1")
|
||||
@ApiOperation(value = "分页查询活动需求1")
|
||||
public String getListPage1() {
|
||||
return "2";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.aos.test.web2;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author: zouyang
|
||||
* @date: 2022/6/1
|
||||
* @description: 需求计划入口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
@Api(value = "ActivityDemandController1", tags = "需求计划入口2")
|
||||
public class ActivityDemandController2 {
|
||||
|
||||
@PostMapping("/getListPage2")
|
||||
@ApiOperation(value = "分页查询活动需求2")
|
||||
public String getListPage() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@PostMapping("/getListPage12")
|
||||
@ApiOperation(value = "分页查询活动需求12")
|
||||
public String getListPage1() {
|
||||
return "2";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
spring.cloud.nacos.config.server-addr=192.168.123.102:8848
|
||||
spring.application.name=aos-gateway
|
||||
|
||||
|
||||
Reference in New Issue
Block a user