做网站都用什么软件,浙江网站建设流程,新手怎么做自己网站广告,电脑上怎么创建wordpress本文目录 安装JDK17安装或者更新Intelij Idea 2024SpringBoot生成项目压缩包下载maven#xff0c;idea添加maven写POST接口浏览器访问GET接口PostMan安装及访问POST接口 安装JDK17
参考#xff1a;https://blog.csdn.net/tiehou/article/details/129575138
安装或者更新Int… 本文目录 安装JDK17安装或者更新Intelij Idea 2024SpringBoot生成项目压缩包下载mavenidea添加maven写POST接口浏览器访问GET接口PostMan安装及访问POST接口 安装JDK17
参考https://blog.csdn.net/tiehou/article/details/129575138
安装或者更新Intelij Idea 2024
安装2024版本可以少很多bug。
第一次下载安装参考: 2024最新版IntelliJ IDEA安装使用指南
旧版Intelij Idea 更新到2024参考: IntelliJ IDEA 直接在软件中更新为最新版
SpringBoot生成项目压缩包
打开https://start.spring.io/具体配置参考https://www.bilibili.com/video/BV1uB4y1a7XZ/
下载mavenidea添加maven
参考Intellij IDEA 2021 Maven 配置指南
写POST接口
参考https://www.bilibili.com/video/BV1uB4y1a7XZ/
同时支持GET/POST的代码 import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;RestController
public class HelloController {RequestMapping(/login)PostMappingGetMappingpublic String login(String name,String password){if (name null || password null) {return fail;}else if(name.equals(zj)password.equals(123456)){return success;}else {return message error;}}RequestMapping(/hello)public String hello(){return hello;}
}浏览器访问GET接口
如果浏览器输入127.0.0.1访问不了参考127.0.0.1 拒绝了我们的连接请求–访问本地IP时显示拒绝访问
PostMan安装及访问POST接口
参考Postman下载安装使用