创建一个新的项目
点击next 在Spring boot尽量选编号小的不带字母的,-->然后选择下面两项 -->最后点击create
启动页面没出现点亮三角符号
pox文件右键 选择add maven
5.创建controller文件和Hellocontroller 类
Hellocontroller类中定义内容为:
package com.example.javavideo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
//RestController --> 修饰的类 --> 控制器
public class Hellocontroller {
@RequestMapping("/hello")
//RequestMapping --> 修饰的类 --> 接口
public String hello(){
return "hello";
}
}
点击运行并访问 http://127.0.0.1:8080/hello 路径
7.单个接口测试
创建javaweb项目并且实现注册登录
https://blog.csdn.net/weixin_44043758/article/details/118367899