初步使用基于RESTful的前后端交互方式,包括前后端增、删、改流程

2023-11-16

目录

一,问题背景

二,解决方法

1,POST增

2,DELETE删

3,PUT改

4,参考源代码


一,问题背景

最开始接触web后端开发时,使用的请求大多是通过自定义的一些请求名称,比如update.do、delete.do等,现在为了规范化开发,要求请求需要符合RESTful风格。

这里以一个简单的web项目为例,需要在它基础之上将其修改为RESTful风格的交互方式。

二,解决方法

1,SpringBoot2.0+默认不支持restful请求,需要在application.properties/yml中设置对应的属性将他打开。

2,在form表单中添加一个input框,对应设置的属性有所要求才能被识别

   <form id="delete" method="post">
          <input type="hidden" value="DELETE" name="_method">
   </form>

3,在controll中,接受对应请求时指明具体的method

    @RequestMapping(value = "{id}", method = RequestMethod.DELETE)
    public String delete(@PathVariable("id") Long id) {
        billService.delete(id);
        return "redirect:/bill/list-page";
    }

1,POST增

1,在原先的html页面的form表单下添加隐藏input标签

2,controller中指明对应的请求方式

3,效果如下

 

2,DELETE删

1,删除原先是通过a标签嵌入href的方式通过GET方式实现,这里保留了原先的样式,通过添加javascript和隐藏表单来实现a标签发送POST请求

2,controller中指明对应的请求方式

3,PUT改

1,点击a标签后通过href属性设置的请求跳转到更新页面,回显需要更新的数据

2,在更新html页面的form表单下添加隐藏input标签

3,controller中指明对应的请求方式

4,参考源代码

BillController.java

import com.github.pagehelper.PageInfo;
import com.xxy.entity.Bill;
import com.xxy.entity.BillType;
import com.xxy.service.BillService;
import com.xxy.service.TypeService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("bill")
public class BillController {
    @Resource
    private BillService billService;
    @Resource
    private TypeService typeService;

    @RequestMapping("list-page")
    public String listPage(@RequestParam(defaultValue = "1") int pageNum,
                           @RequestParam(defaultValue = "5") int pageSize,
                           Bill bill,
                           Model model) {
        List<BillType> types = typeService.selectAll();
        model.addAttribute("types", types);

        PageInfo<Bill> page = billService.listPage(bill, pageNum, pageSize);
        model.addAttribute("page", page);
        return "/bill/list-page";
    }

    @RequestMapping("toAddPage")
    public String toAdd(Model model) {
        List<BillType> billTypes = typeService.selectAll();
        model.addAttribute("types", billTypes);
        return "/bill/add";
    }

    @RequestMapping(value = "", method = RequestMethod.POST)
    public String add(Bill bill) {
        billService.insert(bill);
        return "redirect:/bill/list-page";
    }

    @RequestMapping(value = "{id}", method = RequestMethod.DELETE)
    public String delete(@PathVariable("id") Long id) {
        billService.delete(id);
        return "redirect:/bill/list-page";
    }

    @RequestMapping("toUpdatePage/{id}")
    public String update(@PathVariable("id") Long id, Model model) {
        List<BillType> billTypes = typeService.selectAll();
        model.addAttribute("types", billTypes);
        Bill bill = billService.selectByPrimaryKey(id);
        model.addAttribute("bill", bill);
        return "/bill/update";
    }

    @RequestMapping(value = "", method = RequestMethod.PUT)
    public String update(Bill bill) {
        billService.updateByPrimaryKey(bill);
        return "redirect:/bill/list-page";
    }
}

list-page.html

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>userList</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
    <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
    <script type="text/javascript" src="/js/My97DatePicker/lang/zh-cn.js"></script>
    <script type="text/javascript" th:src="@{/js/jquery/jquery-1.10.2.min.js}"></script>
</head>
<body class="container">
<br/>
<h1>账单列表</h1>
<br/><br/>
<div class="with:80%">
    <form class="form-inline" id="qf" th:action="@{/bill/list-page}" method="post">
        <!-- 隐藏对象PageNum(当前页数)和PageSize(每页行数) -->
        <input type="hidden" name="pageNum" id="pageNum" th:value="${page.pageNum}">
        <input type="hidden" name="pageSize" id="pageSize" th:value="${page.pageSize}">

        <div class="form-group">
            <label for="typeId" class="control-label">类型</label>
            <select name="typeId" id="typeId" class="form-control">
                <option value="">全部</option>
                <option th:each="type: ${types}" th:value="${type.id}" th:text="${type.name}" th:selected="${type.id} + '' == ${#strings.trim(param.typeId)}"></option>
            </select>
        </div>
        <div class="form-group">
            <label for="date1" class="control-label" >开始时间</label>
            <input type="text" class="form-control" name="date1" id="date1" placeholder="开始时间" onclick="WdatePicker()"/>
        </div>
        <div class="form-group">
            <label for="date2" class="control-label">结束时间</label>
            <input type="text" class="form-control" name="date2"  id="date2" placeholder="结束时间" onclick="WdatePicker()"/>
        </div>
        <div class="form-group">
            <input type="submit" value="查询" class="btn btn-info" />
            &nbsp; &nbsp;
            <input type="reset" value="重置" class="btn btn-info" />
            &nbsp; &nbsp;
            <a href="/bill/toAddPage" th:href="@{/bill/toAddPage}" class="btn btn-info">添加</a>
        </div>
    </form>
</div>
<br/>

<div class="with:80%">
    <table class="table table-striped table-bordered">
        <thead>
        <tr>
            <th>#</th>
            <th>标题</th>
            <th>时间</th>
            <th>金额</th>
            <th>类别</th>
            <th>说明</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="bill, status : ${page.list}" th:object="${bill}" th:style="${status.even} ? 'backgroundcolor: grey'">
            <td th:text="${bill.id}">1</td>
            <td th:text="*{title}">1</td>
            <td th:text="*{billTime} ? ${#dates.format(bill.billTime, 'yyyy-MM-dd')}">time</td>
            <td th:text="*{price}">price</td>
            <td th:text="*{typeName}">typename</td>
            <td th:text="*{explain}">explain</td>
            <td>
                <a th:href="|toUpdatePage/*{id}|">修改</a>
                <!--<a th:href="|delete/*{id}|">删除</a>-->

                <a href="#" th:onclick="'javascript:subDelete()'">删除</a>
                <form id="delete" th:action="|/bill/*{id}|" method="post">
                    <input type="hidden" value="DELETE" name="_method">
                </form>

            </td>
        </tr>

        </tbody>
    </table>
</div>

<!-- 分页工具类-->
<ul class="pagination">
    <li><button class="btn btn-default" id="first">第一页</button></li>
    <li><button class="btn btn-default" id="prev">上一页</button></li>
    <li th:each="p:${page.navigatepageNums}">
        <button class="btn btn-default" id="pn" name="pn" th:text="${p}" th:disabled="(${p} == ${page.pageNum})"></button>
    </li>
    <li><button class="btn btn-default" id="next">下一页</button></li>
    <li><button class="btn btn-default" id="last">最后页</button></li>
</ul>

<script th:inline="javascript">
    function subDelete() {
        document.getElementById("delete").submit();
    }
</script>

<script>
    <!-- 分页的js代码-->
    $(function () {
        // 通过内联的js得到分页相关数据
        var pageNum = [[${page.pageNum}]];// 当前页
        var pageCount = [[${page.pages}]];
        var hasNextPage = [[${page.hasNextPage}]];
        var hasPreviousPage = [[${page.hasPreviousPage}]];

        // 绑定按钮事件
        $("#next").click(function () {
            $("#pageNum").val(pageNum + 1);
            $("#qf").submit();// 提交表单
        });
        $("#prev").click(function () {
            $("#pageNum").val(pageNum - 1);
            $("#qf").submit();// 提交表单
        });
        $("#first").click(function () {
            $("#pageNum").val(1);
            $("#qf").submit();// 提交表单
        });
        $("#last").click(function () {
            $("#pageNum").val(pageCount);
            $("#qf").submit();// 提交表单
        });

        // 点击页面跳转
        $("button[name='pn']").click(function () {
            $("#pageNum").val($(this).html());
            $("#qf").submit();// 提交表单
        });

        // 控制按钮状态
        if (!hasNextPage) {
            $("#next").prop("disabled", true);
            $("#last").prop("disabled", true);
        }
        if (!hasPreviousPage) {
            $("#prev").prop("disabled", true);
            $("#first").prop("disabled", true);
        }

    });
</script>

</body>
</html>

add.html

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>user</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
    <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
    <script type="text/javascript" src="/js/My97DatePicker/lang/zh-cn.js"></script>


</head>
<body class="container">
<br/>
<h1>添加账单</h1>
<br/><br/>
<div class="with:80%">
    <form class="form-horizontal" action="/bill/" method="post">
        <input type="hidden" value="POST" name="_method">
        <div class="form-group">
            <label for="typeId" class="col-sm-2 control-label">类型</label>
            <div class="col-sm-10">
                <select name="typeId" id="typeId" class="form-control">
                    <!-- TODO 回显账单类型 -->
                    <option th:each="type: ${types}" th:value="${type.id}" th:text="${type.name}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="title" class="col-sm-2 control-label" >标题</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="title" id="title" placeholder="标题"/>
            </div>
        </div>
        <div class="form-group">
            <label for="billTime" class="col-sm-2 control-label">日期</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="billTime"  id="billTime" placeholder="日期" onclick="WdatePicker()"/>
            </div>
        </div>
        <div class="form-group">
            <label for="price" class="col-sm-2 control-label">金额</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="price"  id="price" placeholder="金额"/>
            </div>
        </div>
        <div class="form-group">
            <label for="explain" class="col-sm-2 control-label">说明</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="explain"  id="explain" placeholder="说明"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="submit" value="保存" class="btn btn-info" />
                &nbsp; &nbsp; &nbsp;
                <input type="reset" value="重置" class="btn btn-info" />
            </div>

        </div>
    </form>
</div>
</body>
</html>

 update.html

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>user</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
    <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
    <script type="text/javascript" src="/js/My97DatePicker/lang/zh-cn.js"></script>
</head>
<body class="container">
<br/>
<h1>修改账单</h1>
<br/><br/>
<div class="with:80%">
	<!-- TODO  回显数据 --> 
    <form class="form-horizontal" action="/bill/" method="post" th:object="${bill}">
        <input type="hidden" value="PUT" name="_method">
        <!--注意这里要添加隐藏对象,用来标记修改对象的id-->
        <input type="hidden" name="id" th:value="*{id}">
        <div class="form-group">
            <label for="typeId" class="col-sm-2 control-label">类型</label>
            <div class="col-sm-10">
                <select name="typeId" id="typeId" class="form-control">
                    <!-- TODO 回显账单类型 -->
                    <option th:each="type: ${types}" th:value="${type.id}" th:text="${type.name}" th:selected="${type.id} + '' == *{typeId}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="title" class="col-sm-2 control-label" >标题</label>
            <div class="col-sm-10">
                <input type="text" th:value="*{title}" class="form-control" name="title" id="title" placeholder="标题"/>
            </div>
        </div>
        <div class="form-group">
            <label for="billTime" class="col-sm-2 control-label">日期</label>
            <div class="col-sm-10">
                <input type="text" th:value="*{#dates.format(billTime, 'yyyy-MM-dd')}" class="form-control" name="billTime"  id="billTime" placeholder="日期" onclick="WdatePicker()"/>
            </div>
        </div>
        <div class="form-group">
            <label for="price" class="col-sm-2 control-label">金额</label>
            <div class="col-sm-10">
                <input type="text" th:value="*{price}" class="form-control" name="price"  id="price" placeholder="金额"/>
            </div>
        </div>
        <div class="form-group">
            <label for="explain" class="col-sm-2 control-label">说明</label>
            <div class="col-sm-10">
                <input type="text" th:value="*{explain}" class="form-control" name="explain" id="explain" placeholder="说明"/>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="submit" value="保存" class="btn btn-info" />
                &nbsp; &nbsp; &nbsp;
                <input type="reset" value="重置" class="btn btn-info" />
            </div>

        </div>
    </form>
</div>
</body>
</html>

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

初步使用基于RESTful的前后端交互方式,包括前后端增、删、改流程 的相关文章

  • 使用 HTML 表单时如何在 HTTP 请求正文中发送数据?

    HTTP 规范规定 POST 请求可以包含任意数据体 An HTML form元素可以 POST 到 URL 并且可能包含input元素 但那些input元素变成查询字符串 我怎样才能得到一个form还可以在按下提交按钮时发送的 HTTP
  • HTTP-DELETE-请求是否允许响应主体?

    我假设响应代码 200 始终允许响应主体 但我找不到任何明确提及删除请求的响应主体 这里明确提到了RFC http www w3 org Protocols rfc2616 rfc2616 sec9 html sec9 7 简短的回答是 Y
  • 使用 PushStreamContent 从 HTTPClient 上传

    我想将大量数据上传到网络服务器from客户端机器 我直接跳到 PushStreamContent 这样我就可以直接写入流 因为结果的大小各不相同 并且可能相当大 流程如下 User runs query gt Reader Ready Ev
  • gRPC(HTTP/2) 比使用 HTTP/2 的 REST 更快吗?

    目标是引入一种性能更好的传输和应用层协议latency and 网络吞吐量 目前 该应用程序使用REST with HTTP 1 1并且我们遇到了很高的延迟 我需要解决这个延迟问题并且我愿意使用gRPC HTTP 2 or 休息 HTTP2
  • 反向代理受 NTLM 保护的网站

    如何将请求代理到受 NTLM 保护的网站 例如团队基金会 and 共享点 我不断得到401 身份验证错误 根据这篇 Microsoft TechNet 文章 https www microsoft com technet prodtechn
  • AWS ALB 截断 HTTP 响应

    我有一个带有目标组的 ALB 和运行 PHP API 的 ECS 集群 我正在尝试查询 API 以获得 CSV 响应 但如果请求通过 ALB 我会得到被截断的结果 当我通过 SSH 连接到运行集群的 EC2 实例并尝试手动运行curl 通过
  • C# - 如何进行 HTTP 调用

    我想对网站进行 HTTP 调用 我只需要点击 URL 不想上传或下载任何数据 最简单 最快的方法是什么 我尝试了下面的代码 但它很慢 并且在第二次重复请求后 它只是超时 59 秒 然后恢复 WebRequest webRequest Web
  • 为什么使用 HTTP 动词?

    因为动词的目标是像 server domain getallrecords 或 server domain delete1record 或类似的 URL 而getallrecords delete1record都是专门为特定目的而设计的 为
  • 是否有用于通过 HTTP、HTTP 隧道发送二进制数据的 Java 库?

    我想通过 HTTP 以二进制格式发送相当大的数据块 也称为HTTP 隧道 http en wikipedia org wiki HTTP tunnel 我想通过 Java 将这种技术用于一些 Java Swing 应用程序 也可能是 And
  • 删除 servlet 中的 cookie 时出现问题

    我尝试使用以下代码删除 servlet 中的 cookie Cookie minIdCookie null for Cookie c req getCookies if c getName equals iPlanetDirectoryPr
  • asp.net core http 如果没有内容类型标头,则删除 `FromBody` 忽略

    我在 http 中使用 bodyDELETE要求 我知道目前删除主体是非标准的 但是允许的 使用时出现问题HttpClient它不允许删除请求的正文 我知道我可以使用SendAsync 但我宁愿让我的 API 更加灵活 我希望这个机构是可选
  • 除了 GET 和 POST 之外,如何从浏览器向 RESTful 应用程序发送任何内容?

    我没有得到 RESTful 的东西 是的 我知道如何从浏览器向我的应用程序发送 GET 请求 这是通过 URL 链接 a href user someone 并且还可以通过form方法发送POST请求 a
  • 在 Go 中跟踪 HTTP 请求时指定超时

    我知道通过执行以下操作来指定 HTTP 请求超时的常用方法 httpClient http Client Timeout time Duration 5 time Second 但是 我似乎不知道在跟踪 HTTP 请求时如何执行相同的操作
  • 按照约定应返回哪些 REST PUT/POST/DELETE 调用?

    根据 REST 意识形态 PUT POST DELETE 请求的响应正文中应该包含什么 返回码呢 是HTTP OK enough 如果有的话 这种约定的原因是什么 我发现了一篇描述 POST PUT 差异的好文章 发布与放置 http ww
  • 如何使用 http 将 Android 中的文件从移动设备发送到服务器?

    在android中 如何使用http将文件 数据 从移动设备发送到服务器 很简单 您可以使用 Post 请求并将文件作为二进制 字节数组 提交 String url http yourserver File file new File En
  • 如何使用 Emacs 通过 HTTP 打开远程文件?

    大多数开源软件都通过某些 HTTP 服务公开其代码 我想从 Emacs 打开并浏览此类代码 但 AFAICS trapmp 只允许ssh and ftp 因此 我的第一个问题是如何打开 HTTP URL 以便在 Emacs 中进行读取 然后
  • iOS 上的多个 HTTP 请求与单个 TCP 连接

    我正在开发一个 iPhone 应用程序 它使用我控制的基于 Web 的 API 连接到持续打开的 TCP 端口并通过 TCP API 发出请求 或者为我想要获取的所有数据发出新的 HTTP 请求 会更快或更高效吗 我认为差异可以忽略不计 但
  • ASP.NET 中 HTTP 缓存相关标头的有效含义

    我正在 ASP NET 2 0 中开发一个 Web 应用程序 其中涉及通过资源处理程序 ashx 提供图像 我刚刚实现了处理缓存标头和条件 GET 请求 这样我就不必为每个请求提供所有图像 但我不确定我是否完全理解浏览器缓存发生了什么 图像
  • python 2.7 中的 HTTP 2 请求

    在 python 中向 HTTP 1 和 HTTP 2 发出请求有什么区别吗 我可以像这样在 python 中进行 HTTP 1 x 调用 url http someURL values param1 key param2 key2 dat
  • 如何使用 python 的 http.client 准确读取一个响应块?

    Using http client在 Python 3 3 或任何其他内置 python HTTP 客户端库 中 如何一次读取一个分块 HTTP 响应一个 HTTP 块 我正在扩展现有的测试装置 使用 python 编写 http clie

随机推荐

  • 【转载】wireshark抓包教程详解

    Wireshark软件安装 软件下载路径 wireshark官网 按照系统版本选择下载 下载完成后 按照软件提示一路Next安装 说明 如果你是Win10系统 安装完成后 选择抓包但是不显示网卡 下载win10pcap兼容性安装包 下载路径
  • 存储的一些基本概念(HBA,LUN)

    time 2008 11 12auther skate 最近存储要升级 对存储的认识也更进一步了 下面是关于存储的一些相关的概念 存储的一些基本概念 HBA LUN 有些新手总是在各式各样的概念里绕来绕去 弄的不亦乐乎 所以我就把我的一些理
  • jmeter断言

    1 设置断言 右击线程组 断言 响应断言 2 设置响应断言 测试的模式输入的内容来自 察看结果树中的响应结果 3 察看结果树执行结果 4 断言结果
  • 《深入浅出OCR》前言知识(一):机器学习最新全面总结

    专栏介绍 经过几个月的精心筹备 本作者推出全新系列 深入浅出OCR 专栏 对标最全OCR教程 具体章节如导图所示 将分别从OCR技术发展 方向 概念 算法 论文 数据集等各种角度展开详细介绍 面向对象 本篇前言知识主要介绍机器学习 方便小白
  • Windows10 - 在当前文件夹下打开cmd(命令行)的方法

    1 清除文件路径输入cmd 2 按住shift 再点击鼠标右键 在某个版本前 这里右键还是打开命令行 后来换成了打开ps 有改注册表的方法 将其改回打开cmd
  • vue3 使用vant框架的van-list 上拉加载用法

  • STM32PWM知识详解

    目录 一 PWM简介 1 定义 2 主要参数 二 PWM产生方式 1 普通IO口与PWM口 2 普通IO口产生PWM 3 PWM口产生PWM 总结 参考链接归纳 一 PWM简介 1 定义 脉冲宽度调制 PWM 是一种数字信号 最常用于控制电
  • 【C++入门】虚继承的实现原理

    转载自 http blog csdn net xiejingfa article details 48028491 准备工作 1 VS2012使用命令行选项查看对象的内存布局 微软的Visual Studio提供给用户显示C 对象在内存中的
  • 计算两个数的平方和

    3 计算两个数的平方和 从键盘读入两个实数 编程计算并输出它们的平方和 要求使用数学函数pow x y 计算平方值 输出结果保留2位小数 程序中所有浮点数的数据类型均为float include
  • html右侧增加页面导航快捷键效果图及代码

    如果一个页面非常长时 在页面右侧增加导航快捷键还是比较有必要的 见效果图 局部放大后的效果 具体实现代码如下 html相关代码 div class gototop none div a href img src static imgs to
  • exit()函数

    进程的终止方式 有8种方式使进程终止 其中前5种为正常终止 它们是 1 从 main 返回 2 调用 exit 3 调用 exit 或 Exit 4 最后一个线程从其启动例程返回 5 最后一个线程调用pthread exit 异常终止有3种
  • Redis4.0从库复制报错"master_link_status:down"处理一例

    环境描述 Redis版本 4 0 2 主库 192 168 0 190 从库 192 168 0 191 今天Zabbix告警一直出现redis sync error的信息 于是登陆redis发现从库复制状态一直是master link s
  • 若依前端框架登录执行过程

    一 登录页面 登录页面是Views文件夹下的login vue文件 二 点击登录调用的方法为 handleLogin handleLogin this refs loginForm validate valid gt if valid th
  • Bugku题目MISC部分(持续更新)

    目录 telnet 1和0的故事 这是一张单纯的图片 隐写 社工 进阶收集 来自论坛提问 gQiRf的附件 zip 简单取证1 mimikatz PasswareKitForensic工具 眼见非实 啊哒 ping FileStoraged
  • spring中使用ThreadPoolTaskExecutor配置线程池

    背景 spring中经常使用ThreadPoolTaskExecutor来调用JDK的ThreadPoolExecutor初始化线程池 尤其在有异步执行的任务时 由于spring 异步任务默认使用的executor不会reuse线程 因此需
  • 寄存器优化补充

    一 简要概述 结构体在寄存器中应用可以简化繁琐的寄存器 这段代码在每个结构体成员前增加了一个 IO 前缀 它的原型在这段代码的第一行 代表了C 语言中的关键字 volatile 在 C 语言中该关键字用于表示变量是易变的 要求编译器不要优化
  • Pytorch cpu版安装及卸载详细教程(以及安装成功后无法在ide中使用问题解决方法)

    Pytorch cpu版安装及卸载详细教程 以及安装成功后无法在ide中使用问题解决方法 一 准备 1 首先确定python的版本 且python是64位 win R 输入cmd 确定 在页面中输入python回车 可查看python版本既
  • React---使用react脚手架搭建项目

    一 使用create react app创建react应用 1 1 react脚手架 xxx脚手架 用来帮助程序员快速创建一个基于xxx库的模板项目 包含了所有需要的配置 语法检查 jsx编译 devServer 下载好了所有相关的依赖 可
  • eclipse改变html字体大小,细说eclipse设置字体以及字体大小?

    电脑现已成为我们工作 生活和娱乐必不可少的工具了 在使用电脑的过程中 可能会遇到eclipse设置字体以及字体大小 的问题 如果我们遇到了eclipse设置字体以及字体大小 的情况 该怎么处理怎么才能解决eclipse设置字体以及字体大小
  • 初步使用基于RESTful的前后端交互方式,包括前后端增、删、改流程

    目录 一 问题背景 二 解决方法 1 POST增 2 DELETE删 3 PUT改 4 参考源代码 一 问题背景 最开始接触web后端开发时 使用的请求大多是通过自定义的一些请求名称 比如update do delete do等 现在为了规