移除smart-doc,计划替换为yapi
This commit is contained in:
1 parent
2f0b21c3fa
commit
9d7bf97823
8 files changed
+78
-29
No files matched your search
Whitespace-only changes.
Generated
+4
@@ -11,6 +11,10 @@
|
|||||||
<file url="file://$PROJECT_DIR$/crane-boot/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/crane-boot/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/crane-common/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/crane-common/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/crane-common/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/crane-common/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/crane-doc/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/crane-doc/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/crane-log/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/crane-log/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/crane-web/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/crane-web/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/crane-web/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/crane-web/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
|||||||
Generated
+1
@@ -11,6 +11,7 @@
|
|||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$/crane-api-common/pom.xml" />
|
<option value="$PROJECT_DIR$/crane-api-common/pom.xml" />
|
||||||
<option value="$PROJECT_DIR$/crane-api-web/pom.xml" />
|
<option value="$PROJECT_DIR$/crane-api-web/pom.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/crane-doc/pom.xml" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.crane.common;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用数据接口
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/data")
|
||||||
|
public class DataController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据接口
|
||||||
|
* @param table 表名
|
||||||
|
* @param filters 查询过滤条件(JSON字符串)
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/load")
|
||||||
|
public Map<String, Object> loadData(
|
||||||
|
@RequestParam String table,
|
||||||
|
@RequestParam(required = false) String filters
|
||||||
|
) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("code", 0);
|
||||||
|
result.put("data", "模拟查询结果");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存数据接口
|
||||||
|
* @param table 表名
|
||||||
|
* @param data 要保存的数据(键值对)
|
||||||
|
* @return 保存结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/save")
|
||||||
|
public Map<String, Object> saveData(
|
||||||
|
@RequestParam String table,
|
||||||
|
@RequestBody Map<String, Object> data
|
||||||
|
) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
result.put("code", 0);
|
||||||
|
result.put("msg", "保存成功");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void test(){
|
||||||
|
System.out.println("test");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"serverUrl": "http://localhost:8080",
|
|
||||||
"allInOne": true,
|
|
||||||
"outPath": "src/main/resources/doc",
|
|
||||||
"packageFilters": "com.crane.web.controller"
|
|
||||||
}
|
|
||||||
@@ -9,14 +9,12 @@
|
|||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>crane-doc</artifactId>
|
<artifactId>crane-log</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.ly.smart-doc</groupId>
|
|
||||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
</project>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>crane-common</module>
|
<module>crane-common</module>
|
||||||
<module>crane-boot</module>
|
<module>crane-boot</module>
|
||||||
<module>crane-doc</module>
|
<module>crane-log</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<!-- 版本信息 -->
|
<!-- 版本信息 -->
|
||||||
@@ -68,6 +68,18 @@
|
|||||||
<artifactId>crane-common</artifactId>
|
<artifactId>crane-common</artifactId>
|
||||||
<version>${crane.version}</version>
|
<version>${crane.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.crane</groupId>
|
||||||
|
<artifactId>crane-doc</artifactId>
|
||||||
|
<version>${crane.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.crane</groupId>
|
||||||
|
<artifactId>crane-log</artifactId>
|
||||||
|
<version>${crane.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
@@ -89,17 +101,6 @@
|
|||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.ly.smart-doc</groupId>
|
|
||||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
|
||||||
<version>${smart.doc.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<!--指定生成文档的使用的配置文件-->
|
|
||||||
<configFile>${basedir}/src/main/resources/smart-doc.json</configFile>
|
|
||||||
<projectName>测试</projectName>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
Reference in new issue
Block a user