Python 官方文档:入门教程 => 点击学习
目录idea快速搭建Spring Boot项目1.创建项目2.编写控制器3.运行项目IDEA添加配置SpringBoot spring Initializr工具1.点击file&nd
老规矩,点击Create New Project
在com.demo.springbootquickdemo包下创建controller包,在controller包下创建类QuickDemoController,内容如下:
package com.demo.springbootquickdemo.controller;
import org.springframework.WEB.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class QuickDemoController {
@RequestMapping("hello")
public String hello(){
return "hello world,spring-boot quick";
}
}
运行完之后在浏览器输入Http://localhost:8080/hello,结果:
如何在idea中添加Spring Initializr工具
新手在刚刚安装idea工具后,打算构建一个SpringCloud工程,却发现找不到构建工程的Spring Initializr工具。
如下图:
接下来我们需要手动给idea下载Spring Initializr所需要的插件
这时候就能看到Spring Initializr工具了。
以上为个人经验,希望能给大家一个参考,也希望大家多多支持编程网。
--结束END--
本文标题: IDEA快速搭建spring boot项目教程(Spring initializr)
本文链接: https://www.lsjlt.com/news/162955.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0