Spring Boot

通过Restful API,在PostMan 中返回数据

  1. 资源组

新增

POST/resource_group/ad
  请求体:格式:from-data参数:groupName=example

响应:

{"code": 200,"msg": "保存成功","data": null
}
  • 删除

DELETE /resource_group/delete?id=1

参数:id—资源组主键
响应:

{"code": 0,"data": {},"msg": "string"
}

GET/resource_group/list

无参数
响应

{"code": 200,"msg": "查询成功","data": [{"id": 19,"name": "默认分组","createTime": "2021-07-28T18:08:12","updateTime": "2021-07-28T18:08:12"}]
}

过程:

在pojo包下封装了Resources_group结果类:

public class Resources_group {private Integer id;private String name;private Date create_time;private Date update_time;public  Resources_group(String name){this.name = name;}
public  Resources_group(){}public Resources_group(String name, Date create_time, Date update_time) {this.name = name;this.create_time = create_time;this.update_time = update_time;}public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public Date getCreate_time() {return create_time;}public void setCreate_time(Date create_time) {this.create_time = create_time;}public Date getUpdate_time() {return update_time;}public void setUpdate_time(Date update_time) {this.update_time = update_time;}@Overridepublic String toString() {return "Resources_group{" +"id=" + id +", name='" + name + '\'' +", create_time=" + create_time +", update_time=" + update_time +'}';}
}

在mappers包下有Resources_groupMapper 接口

public interface Resources_groupMapper {public  int add(Resources_group resources_group);public int delete(int id);//查询List<Resources_group> select();}

在resources/mappers/ResourcesGroupDao.xml下写映射关系

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!--填写对应的dao文件所在的路径-->
<mapper namespace="com.suyuan.mappers.Resources_groupMapper"><resultMap id="ResultResourceGroup" type="com.suyuan.pojo.Resources_group"><id property="id" column="id"/><result property="name" column="name"/><result property="create_time" column="create_time"/><result property="update_time" column="update_time"/></resultMap><!--删除用户信息--><delete id="delete" parameterType="int">
delete from t_resources_group
where id=#{id}</delete><!--添加-->
<insert id="add" parameterType="com.suyuan.pojo.Resources_group">INSERT INTOt_resources_group(name,create_time,update_time)values (#{name},#{create_time},#{update_time})
</insert><!--查询-->
<select id="select" resultType="com.suyuan.pojo.Resources_group">select *from t_resources_group
</select>
</mapper>

这个时候我们开始写service/ResourceService

@Service
public class ResourceGroupService {@Resourceprivate Resources_groupMapper resources_groupMapper;//添加public ResultBean add(String groupName){Resources_group rg = new Resources_group(groupName, new Date(), new Date());int a = resources_groupMapper.add(rg);ResultBean resultBean = new ResultBean();resultBean.setData("null");resultBean.setCode(200);resultBean.setMsg("添加成功");return resultBean;}//删除public  ResultBean delete(int id ){int b = resources_groupMapper.delete(id);ResultBean resultBean = new ResultBean();resultBean.setCode(0);resultBean.setMsg("string");return resultBean;}//查询public ResultBean select(){List<Resources_group> list = resources_groupMapper.select();ResultBean resultBean = new ResultBean();resultBean.setData(list);resultBean.setCode(200);resultBean.setMsg("查询成功");return resultBean;}
}

最后完成controller/ResourceGroupController

@Controller
@RequestMapping("/resource_group")
public class ResourceGroupController {@Autowiredprivate ResourceGroupService resourceGroupService;//通过groupName 对数据进行添加@RequestMapping(value = "/add",method = RequestMethod.POST)@ResponseBodypublic ResultBean add(String groupName ){return resourceGroupService.add(groupName);}//删除通过主键id@RequestMapping(value = "/delete",method = RequestMethod.DELETE)@ResponseBodypublic ResultBean delete(int id){return resourceGroupService.delete(id);}//查询列表@RequestMapping(value = "/select",method = RequestMethod.GET)@ResponseBodypublic ResultBean listResourceGroup(){return resourceGroupService.select();}
}

最后在PostMan中进行测试:
1.添加:


2.根据id进行删除



3.查询表中的内容

  • 资源组件

  • 新增/修改

POST/resource/addOrUpdate

请求参数:
格式application/json
示例:

{"content": "string","description": "string","groupId": 0,"id": 0,"name": "string","type": "string"
}

响应:

{"code":200,"msg":"保存成功","data":null}
  • 列表

POST/resource/list

请求参数:
格式:application/json
示例:

{"code":"",
"groupId":"",
"name":""
}

响应:

{"code": 200,"msg": "查询成功","data": {"records": [{"id": 47,"code": "res_1627871127986","name": "random-amq-product.ktr","description": "本流程每运⾏⼀次随机⽣成⼀条字符串\n\n然后输出到ActiveMQ的dexfrom-random队列","groupId": 21,"type": "转换","filePath": "ktr/21/random-amq-product.ktr","state": 1,"createTime": "2021-07-30T16:57:12","updateTime": "2021-08-02T10:25:28","groupName": "调度测试"},{"id": 46,"code": "res_1627634761122","name": "dex-amq-kafka-2.ktr","description": "","groupId": 20,
"type": "转换","filePath": "ktr/20/dex-amq-kafka-2.ktr","state": 1,"createTime": "2021-07-30T16:46:01","updateTime": "2021-07-30T16:46:01","groupName": "activemq"}] }
}

过程

1.在mappers包下创建一个ResourcesMapper接口

ublic interface ResourcesMapper {//添加或者更新,根据id,有则更新无则添加int addOrUpdate (Resources resources);//查询List<Resources> select(ResourceController.ListParam param);}

2.在pojo包下创建Resources实体类,并实现get,set,toString方法,以及实现全参构造器以及无参构造器

import java.util.Date;public class Resources {private Integer id;private String code;private String name;private String description;private int group_id;private Integer type;private String file_path;private Date create_time;private Date update_time;private int state;private String groupName;public Resources() {}public Resources(Integer id, String code, String name, String description, int group_id, Integer type, String file_path, Date create_time, Date update_time, int state) {this.id = id;this.code = code;this.name = name;this.description = description;this.group_id = group_id;this.type = type;this.file_path = file_path;this.create_time = create_time;this.update_time = update_time;this.state = state;}public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}public String getCode() {return code;}public void setCode(String code) {this.code = code;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public int getGroup_id() {return group_id;}public void setGroup_id(int group_id) {this.group_id = group_id;}public Integer getType() {return type;}public void setType(Integer type) {this.type = type;}public String getFile_path() {return file_path;}public void setFile_path(String file_path) {this.file_path = file_path;}public Date getCreate_time() {return create_time;}public void setCreate_time(Date create_time) {this.create_time = create_time;}public Date getUpdate_time() {return update_time;}public void setUpdate_time(Date update_time) {this.update_time = update_time;}public int getState() {return state;}public void setState(int state) {this.state = state;}public String getGroupName() {return groupName;}public void setGroupName(String groupName) {this.groupName = groupName;}@Overridepublic String toString() {return "Resources{" +"id=" + id +", code='" + code + '\'' +", name='" + name + '\'' +", description='" + description + '\'' +", group_id=" + group_id +", type=" + type +", file_path='" + file_path + '\'' +", create_time=" + create_time +", update_time=" + update_time +", state=" + state +'}';}
}

3.在resources/mappers包下创建 ResourcesDao.xml映射文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.suyuan.mappers.ResourcesMapper"><!--通过查询映射结果--><resultMap id="ResultResource" type="com.suyuan.pojo.Resources"><id property="id" column="id"/><result property="code" column="code"/><result property="name" column="name"/><result property="description" column="description"/><result property="group_id" column="groupId"/><result property="type" column="type"/><result property="file_path" column="file_path"/><result property="create_time" column="create_time"/><result property="update_time" column="update_time"/><result property="state" column="state"/><result property="groupId" column="reg.id"/><result property="groupName" column="groupName"/></resultMap><!--新增/修改--><insert id="addOrUpdate" parameterType="com.suyuan.pojo.Resources" keyProperty="id" keyColumn="id"useGeneratedKeys="true">insert INTO  t_resources(id,code,name,description,group_id,type,file_path,create_time,update_time,state)values (#{id},#{code},#{name},#{description},#{group_id},#{type},#{file_path},#{create_time},#{update_time},#{state})ON DUPLICATE KEY UPDATEname =#{name},description =#{description},group_id =#{group_id},type =#{type}</insert><!--多表查询--><select id="select" resultMap="ResultResource">select re.id id,re.code code,re.name name, re.description description,re.group_id groupId,re.*,reg.namegroupName,reg.idfrom t_resources re inner join t_resources_group reg on re.group_id=reg.idwhere 1=1<if test='code !=null and code!=""'>and code like %#{code}%</if><if test="groupId != null and groupId!=0 ">and group_id = #{groupId}</if><if test='name !=null and name!=""'>and re.name like #{name}</if></select>
</mapper>

4.在service包下创建ResourceService

@Service
public class ResourceService {@Resourceprivate ResourcesMapper resourcesMapper;public static class Params_add {private Integer id;private String name;private String description;private Integer groupId;private Integer type;private String content;public Params_add() {}public Params_add(Integer id, String name, String description, Integer groupId, Integer type, String content) {this.id = id;this.name = name;this.description = description;this.groupId = groupId;this.type = type;this.content = content;}public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}public String getName() {return name;}public void setName(String name) {this.name = name;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public Integer getGroupId() {return groupId;}public void setGroupId(Integer groupId) {this.groupId = groupId;}public Integer getType() {return type;}public void setType(int type) {this.type = type;}public String getContent() {return content;}public void setContent(String content) {this.content = content;}@Overridepublic String toString() {return "Params_add{" +"id=" + id +", name='" + name + '\'' +", description='" + description + '\'' +", groupId=" + groupId +", type='" + type + '\'' +", content='" + content + '\'' +'}';}}public ResultBean addOrUpdate(Params_add params_add) {Resources re = new Resources(params_add.getId(), "zzz", params_add.getName(), params_add.getDescription(),params_add.getGroupId(), params_add.getType(), "ccc", new Date(), new Date(), 22);int b = resourcesMapper.addOrUpdate(re);ResultBean resultBean = new ResultBean();resultBean.setData("null");resultBean.setCode(200);resultBean.setMsg("新增|更新成功");return resultBean;}//查询public ResultBean select(ResourceController.ListParam param) {List<Resources> list = resourcesMapper.select(param);ResultBean resultBean = new ResultBean();return resultBean.SUCCESS("查询成功", list);}
}

5.在controller包创建ResourceController

@RestController
@RequestMapping("/resource")
public class ResourceController {@Autowiredprivate ResourceService resourceService;@RequestMapping(value = "/addOrUpdate",method = RequestMethod.POST)@ResponseBodypublic ResultBean addOrUpdate(@RequestBody ResourceService.Params_add params_add){return resourceService.addOrUpdate(params_add);}public static class ListParam {private String code;private Integer groupId;private String name;public String getCode() {return code;}public void setCode(String code) {this.code = code;}public Integer getGroupId() {return groupId;}public void setGroupId(Integer groupId) {this.groupId = groupId;}public String getName() {return name;}public void setName(String name) {this.name = name;}}//查询列表@RequestMapping(value = "/select",method = RequestMethod.POST, headers = "Accept=application/json")@ResponseBodypublic ResultBean listResourceGroup(@RequestBody ListParam param){return resourceService.select(param);}}

在PostMan中进行测试

一:添加或者更新
1.表中没有addOrUpdate的id,所以进行的添加


2.当表中有所要请求的id,所以对数据库中相同id的数据进行了更新,这里对44号id的name进行的更新.


二:查询
当code,groupId,name.为空时,将查询这个表中的所有的数据;当不为空时,将查询这些值所对应的数据.
1.这些字段为空时:

{"code": 200,"msg": "查询成功","data": [{"id": 44,"code": "zzz","name": "abc","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-10T06:36:48.000+00:00","update_time": "2021-08-10T14:39:53.000+00:00","state": 22,"groupName": "abc"},{"id": 45,"code": "zzz","name": "wys","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-04T03:02:36.000+00:00","update_time": "2021-08-09T17:29:57.000+00:00","state": 22,"groupName": "abc"},{"id": 46,"code": "zzz","name": "abc","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-04T08:06:58.000+00:00","update_time": "2021-08-09T16:39:30.000+00:00","state": 22,"groupName": "abc"},{"id": 52,"code": "zzz","name": "wys","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-09T01:58:20.000+00:00","update_time": "2021-08-09T17:52:19.000+00:00","state": 22,"groupName": "abc"},{"id": 53,"code": "zzz","name": "wys","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-09T09:30:30.000+00:00","update_time": "2021-08-09T09:30:30.000+00:00","state": 22,"groupName": "abc"},{"id": 79,"code": "zzz","name": "wys","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-09T09:51:47.000+00:00","update_time": "2021-08-09T09:51:47.000+00:00","state": 22,"groupName": "abc"},{"id": 80,"code": "zzz","name": "wys","description": "string","group_id": 104,"type": 9,"file_path": "ccc","create_time": "2021-08-09T09:30:44.000+00:00","update_time": "2021-08-09T09:30:44.000+00:00","state": 22,"groupName": "abc"}]
}

2.当name为abc时:

数据库的t_resources表和t_resources_group表为

  1. 流程组件

新增/修改

POST /flow/addOrUpdate

请求参数:
格式:application/json
式例:

{"description": "","gid": 21,"logLevel": "BASIC","name": "随机数到activemq","type": "定时调度","steps": "[47]"
}

响应:

{"code":200,"msg":"新增|更新成功","data":null}

列表

POST /flow/list

请求参数:
格式:application/json
示例:

{"code": "","gid": "","name": "","type": null
}

响应:

{"code": 200,"msg": "SUCCESS","data": {"records": [{"id": 53,"code": "flow_1627871654597","name": "随机数到activemq","type": "定时调度","logLevel": "BASIC","description": "","steps": "[47]","status": "未开始","createTime": "2021-08-02T10:34:14","updateTime": "2021-08-02T10:34:14","groupName": "调度测试","resourcesList": [{"id": 47,
"code": "res_1627871127986",
"name": "random-amq-product.ktr",
"description": "本流程每运⾏⼀次随机⽣成⼀条字符串\n\n然后输出到ActiveMQ的dex-from-random队列","groupId": 21,
"type": "转换","filePath": "ktr/21/random-amq-product.ktr",
"state": 1,
"createTime": "2021-07-30T16:57:12",
"updateTime": "2021-08-02T10:25:28",
"groupName": null}],"gid": 21
}

过程

1:在pojo包创建一个实体类Flow,实现get,set方法,toString方法,全参和无参构造器,

@Alias("t_flow")
public class Flow {private int id;private String code;private String name;private Integer type;private  Integer log_level;private String description;private int g_id;private  String steps;private int status;private Date create_time;private Date update_time;private String groupName;private List<Resources> resourcesList;public static Integer ids(Flow flows){return flows.getId();}public  Flow(){}public Flow(int id, String code, String name, Integer type, Integer log_level, String description, int g_id, String steps, int status, Date create_time, Date update_time) {this.id = id;this.code = code;this.name = name;this.type = type;this.log_level = log_level;this.description = description;this.g_id = g_id;this.steps = steps;this.status = status;this.create_time = create_time;this.update_time = update_time;}public int getId() {return id;}public void setId(int id) {this.id = id;}public String getCode() {return code;}public void setCode(String code) {this.code = code;}public String getName() {return name;}public void setName(String name) {this.name = name;}public Integer getType() {return type;}public void setType(Integer type) {this.type = type;}public Integer getLog_level() {return log_level;}public void setLog_level(Integer log_level) {this.log_level = log_level;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public int getG_id() {return g_id;}public void setG_id(int g_id) {this.g_id = g_id;}public String getSteps() {return steps;}public void setSteps(String steps) {this.steps = steps;}public int getStatus() {return status;}public void setStatus(int status) {this.status = status;}public Date getCreate_time() {return create_time;}public void setCreate_time(Date create_time) {this.create_time = create_time;}public Date getUpdate_time() {return update_time;}public void setUpdate_time(Date update_time) {this.update_time = update_time;}public String getGroupName() {return groupName;}public void setGroupName(String groupName) {this.groupName = groupName;}public List<Resources> getResourcesList() {return resourcesList;}public void setResourcesList(List<Resources> resourcesList) {this.resourcesList = resourcesList;}@Overridepublic String toString() {return "Flow{" +", code=" + code +", name='" + name + '\'' +", type='" + type + '\'' +", log_level='" + log_level + '\'' +", description='" + description + '\'' +", g_id=" + g_id +", steps=" + steps +", status=" + status +", create_time=" + create_time +", update_time=" + update_time +'}';}
}

2.在mappers包下创建FlowMapper接口,在接口中添加方法

@Mapper
@Repository
public interface FlowMapper {public void insertFlow(Flow flow);public int insert(Flow flow);public int delete(int id);public int update(Flow flow);//查询所有的数据List<Flow> query();public Flow FlowInfo(int id);int addOrUpdate(Flow flow);//查询列表List<Flow> select(FlowController.SelectFlow selectFlow);List<Flow> list(FlowController.SelectFlow selectFlow);
}

3.在resources/mappers包下创建FlowDao.xml映射文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<!--填写对应的dao文件所在的路径-->
<mapper namespace="com.suyuan.mappers.FlowMapper"><resultMap id="ResultFlow" type="com.suyuan.pojo.Flow"><id property="id" column="id"></id><result property="code" column="code"></result><result property="name" column="name"></result><result property="type" column="type"></result><result property="log_level"  column="log_level"></result><result property="description"  column="description"></result><result property="g_id"  column="g_id"></result><result property="steps"  column="steps"></result><result property="status"  column="status"></result><result property="create_time"  column="create_time"></result><result property="update_time"  column="update_time"></result></resultMap><!--新增/修改--><insert id="addOrUpdate" parameterType="com.suyuan.pojo.Flow" keyProperty="id" keyColumn="id" useGeneratedKeys="true">INSERT  INTOt_flow(id,code,name,type,log_level,description,g_id,steps,status,create_time,update_time)VALUES (#{id},#{code},#{name},#{type},#{log_level},#{description},#{g_id},#{steps},#{status},#{create_time},#{update_time})ON DUPLICATE KEY UPDATEdescription =#{description},log_level=#{log_level},g_id=#{g_id},name=#{name},type=#{type},steps=#{steps}</insert><!--多表查询--><select id="select" resultMap="ResultFlow">
select a.id id,a.code code,a.name name,a.type type,a.log_level log_level,a.description description,a.g_id g_id,a.steps steps,
a.status status,a.create_time create_time,a.update_time update_time,b.id gid
from t_flow a join t_resources_group b on a.g_id=b.id
where 1=1
<if test='code !=null and code!=""'>and code like#{code}
</if>
<if test="gid !=null and gid!=0">and gid = #{gid}
</if>
<if test='name !=null and name!=""'>and a.name like #{name}
</if>
<if test="type !=null and type!=0">and type = #{type}
</if></select></mapper>

4.在service包下创建FlowService

@Service
public class FlowService {public static class Flow_add{private int id;private String description;private int gid;private Integer logLevel;private String name;private int type;private String steps;public int getId() {return id;}public void setId(int id) {this.id = id;}public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}public int getGid() {return gid;}public void setGid(int gid) {this.gid = gid;}public Integer getLogLevel() {return logLevel;}public void setLogLevel(Integer logLevel) {this.logLevel = logLevel;}public String getName() {return name;}public void setName(String name) {this.name = name;}public int getType() {return type;}public void setType(int type) {this.type = type;}public String getSteps() {return steps;}public void setSteps(String steps) {this.steps = steps;}}public ResultBean addOrUpdate(Flow_add flow_add) {Flow fl = new Flow(flow_add.getId(), "qqq", flow_add.getName(), flow_add.getType(), flow_add.getLogLevel(), flow_add.getDescription(), flow_add.getGid(), flow_add.getSteps(), 10, new Date(), new Date());int c = flowMapper.addOrUpdate(fl);ResultBean resultBean = new ResultBean();resultBean.setCode(200);resultBean.setMsg("新增|更新成功");resultBean.setData("null");return resultBean;}//查询public ResultBean select(FlowController.SelectFlow selectFlow) {List<Flow> flows = flowMapper.select(selectFlow);for (Flow flow : flows) {List<Resources> resources = resourcesMapper.query(selectFlow);flow.setResourcesList(resources);}ResultBean resultBean = new ResultBean();return resultBean.SUCCESS("查询成功", flows);}}

5.在contraller包下创建FlowController

@RestController
@RequestMapping("/flow")
public class FlowController {@Autowiredprivate FlowService flowService;@RequestMapping(value = "/addOrUpdate", method = RequestMethod.POST)@ResponseBodypublic ResultBean addOrUpdate(@RequestBody FlowService.Flow_add flow_add) {return flowService.addOrUpdate(flow_add);}//查询列表public static class SelectFlow {private String code;private String gid;private String name;private Integer type;public String getCode() {return code;}public void setCode(String code) {this.code = code;}public String getGid() {return gid;}public void setGid(String gid) {this.gid = gid;}public String getName() {return name;}public void setName(String name) {this.name = name;}public Integer getType() {return type;}public void setType(Integer typr) {this.type = typr;}}@RequestMapping(value = "/list", method = RequestMethod.POST)@ResponseBodypublic ResultBean ListFlow(@RequestBody SelectFlow selectFlow) {return flowService.select(selectFlow);}
}

进行测试
一:测试addOrUpdate
根据id进行测试,测试的id如果在数据库的t_flow中存在就会将数据库对应的数据进行更新;如果不存在就会在t_flow进行新增。
1.先测试id一样时的数据,这是没有操作的时候

这个时候将67号的name改为test


2.当id在数据库中找不到时:
这个时候我们发送一条id为:70的数据,这个时候,我们将会看到数据库中新增了一条id为70的一条数据

Spring Boot 通过Restful API,在PostMan 中返回数据相关推荐

  1. Spring Boot与RESTful API

    2019独角兽企业重金招聘Python工程师标准>>> 在上一篇Spring Boot开发WEB页面文章中,我们介绍了如何搭建一个有页面的web项目,这一篇我们则着重讲一下Sprin ...

  2. Spring Boot集成Restful Api在线文档接口调试工具 Swagger

    文章目录 一.Swagger简介 Swagger有什么用? 二.环境准备 三.构建Spring Boot工程 四.引入Swagger依赖 五.编写一个Test控制器 六.配置Swagger 七.最终测 ...

  3. Spring Boot构建RESTful API与单元测试

    首先,回顾并详细说明一下在快速入门中使用的@Controller.@RestController.@RequestMapping注解.如果您对Spring MVC不熟悉并且还没有尝试过快速入门案例,建 ...

  4. 使用Spring Boot构建RESTFul服务

    每个人都在谈论微服务,例如WSO2微服务框架 , Spring Boot等.由于我已经很长时间没有从事任何与Spring相关的项目了,所以我想到了使用Spring Boot实现一个简单的RESTFul ...

  5. Spring Boot 构建RESTful Web服务

    Spring Boot 构建RESTful Web服务 本指南将引导您完成使用Spring 创建" Hello World" RESTful Web服务的过程. 你会建立什么 您将 ...

  6. spring boot开发接口api

    spring boot开发接口api ​ 在上一次教了大家怎么去搭建一个自己的后端模板之后,现在和大家分享讨论一下如何开发RestfulApi接口. 首先开发api之前要考虑到后端是需要写api文档的 ...

  7. spring boot 整合RESTFUL服务

    目录 1.自定义请求路径 2.自定义查询方法 3.隐藏方法 4.配置cors 5.其他配置 1.添加restful项目的pom文件 <dependency><groupId>o ...

  8. 将Spring Boot应用程序部署到Tomcat中

    "我喜欢编写身份验证和授权代码." 〜从来没有Java开发人员. 厌倦了一次又一次地建立相同的登录屏幕? 尝试使用Okta API进行托管身份验证,授权和多因素身份验证. 部署应用 ...

  9. java servlet 部署到tomcat_如何把spring boot项目部署到tomcat容器中

    把spring-boot项目按照平常的web项目一样发布到tomcat容器下 一.修改打包形式 在pom.xml里设置 war 二.移除嵌入式tomcat插件 在pom.xml里找到spring-bo ...

最新文章

  1. zabbix4.0搭建(基于CentOS6.8)
  2. Use Ghidra To Reverse GenyMotion—Suggestion
  3. x-lite asterisk 成功实现视频通话
  4. 3.UNIX 环境高级编程--文件 IO
  5. zookeeper启动失败解决方法
  6. 百度云盘服务器在哪,百度云盘登陆入口在哪里?
  7. linux驱动之TouchPanel驱动
  8. win7 计算机 其他 删除,win7双系统怎么删除一个?windows7双系统删除一个方法汇总...
  9. 快速云:IDC、EDC、ODC、DC分别指什么机房?
  10. 高校wifi认证登录
  11. 关于数字的智力题-三个女儿的年龄
  12. ★ZOJ 3380 Patchouli's Spell Cards 详细题解 (递推+组合数求方案数)
  13. 已知最小小行星准备迎接人类探视
  14. Cris 小哥哥的大数据项目之 HBase 模拟微博核心功能
  15. 点评国内SNS网站-转帖
  16. Shell脚本实用小技巧-教你屏蔽执行命令的所有显示信息,包含错误信息
  17. Win7项目分享part1:Windows7准备的3个阶段
  18. 兆骑科创高层次人才引进平台,赛事活动举办,线上路演
  19. elf中的bss data
  20. 至离开北京的朋友们(r4笔记第99天)

热门文章

  1. Diagram Designer 简体中文版安装包百度云链接
  2. 使用python 画全换手后筹码分布图
  3. matlab 图像修改
  4. 原生JS实现鼠标按下拖拽效果
  5. mysql死锁如何释放_mysql 死锁:如何解决mysql死锁
  6. Linux CPU、内存监控命令详解
  7. python实现回调函数,自定义事件
  8. MindManager2020英文界面切换中文界面教程
  9. UDS诊断系列之九 诊断仪在线(3E)服务
  10. 布尔表达式和正则表达式_布尔表达式约简的对偶原理和规则