SpringBoot - 无需idea联网的springboot项目
【摘要】
文章目录
文章目录
文章目录前言1.进入Spring官网2.鼠标放到Projects3.点击spring-boot4.点击spring initializr5.击ADD DEPENDENCIES...
文章目录
前言
不需要联网的springboot项目:
1.进入Spring官网
- Spring | Home
2.鼠标放到Projects
3.点击spring-boot
4.点击spring initializr
设置配置:如下图
5.击ADD DEPENDENCIES
- 添加依赖
6.生成压缩文件
- 点击GENERATE
7.打开压缩文件复制到工程目录下
8.导入工程
- File
- Project Structure
- 选择Modules
- 点击+号
- 选择Import Modules
- 点击需要导入的项目
- 选择Maven
9.创建控制类
package com.jkj.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/booksTwo")
public class BookController {
@GetMapping
public String ById(){
System.out.println("springboot_02 is running...");
return "springboot_02 is running...";
}
}
10.测试
- 在main方法类右键运行
文章来源: blog.csdn.net,作者:不会压弯的小飞侠,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/qq_43514330/article/details/125671307
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
作者其他文章
评论(0)