init
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.jnssd</groupId>
|
||||
<artifactId>spring-boot-openapi</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>spring-boot-springdoc</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jnssd</groupId>
|
||||
<artifactId>spring-boot-model</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.jnssd.controller;
|
||||
|
||||
import com.jnssd.model.Menu;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <h3>spring-boot-openapi</h3>
|
||||
* <p>菜单</p>
|
||||
*
|
||||
* @author zxj
|
||||
* @since 2023-10-12 16:33:23
|
||||
*/
|
||||
@RestController("menu")
|
||||
public class MenuController {
|
||||
|
||||
List<Menu> list = new java.util.ArrayList<>();
|
||||
|
||||
public ResponseEntity<List<Menu>> getAll() {
|
||||
return ResponseEntity.ok(list);
|
||||
}
|
||||
|
||||
// 添加方法
|
||||
@PostMapping("add")
|
||||
public ResponseEntity<Menu> add(Menu entity) {
|
||||
list.add(entity);
|
||||
return ResponseEntity.ok(entity);
|
||||
}
|
||||
|
||||
// 添加方法
|
||||
@PostMapping("update")
|
||||
public ResponseEntity<Menu> update(Menu entity) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// 删除方法
|
||||
@PostMapping("delete")
|
||||
public ResponseEntity<Menu> delete(Menu entity) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// 查询方法
|
||||
@PostMapping("query")
|
||||
public ResponseEntity<List<Menu>> query(Menu entity) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.jnssd.controller;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <h3>spring-boot-openapi</h3>
|
||||
* <p>角色</p>
|
||||
*
|
||||
* @author zxj
|
||||
* @since 2023-10-12 16:32:38
|
||||
*/
|
||||
@Data
|
||||
public class RoleController {
|
||||
private String id;
|
||||
private String name;
|
||||
private String description;
|
||||
private String createTime;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.jnssd.controller;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <h3>spring-boot-openapi</h3>
|
||||
* <p>用户</p>
|
||||
*
|
||||
* @author zxj
|
||||
* @since 2023-10-12 16:30:04
|
||||
*/
|
||||
@Data
|
||||
public class UserController {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String password;
|
||||
private String email;
|
||||
private String phone;
|
||||
private String address;
|
||||
private String description;
|
||||
private String createTime;
|
||||
private String updateTime;
|
||||
private String status;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user