SpringBoot(一):快速搭建SpringBoot项目

1.springBoot的优点:

(1)快速构建项目

(2)对主流开发框架的无配置集成

(3)项目可独立运行,无需外部依赖servlet容器

(4)提供运行时的应用监控

(5)提高开发、部署效率

(6)与云计算天然集成

 

2.快速搭建springBoot项目(eclipse环境)

在线快速构建项目:https://start.spring.io/

(1)sts安装教程:https://blog.csdn.net/qq_37231511/article/details/90640542

如果实在搞不定,重新下载eclipse和sts,百度云链接如下:

https://pan.baidu.com/s/1yH_aCzh4eROywnPLbRYZKQ

提取码:3ruf

https://pan.baidu.com/s/1jAB0DznlrA7bZ0SgtNCiLA

提取码:ytha

 

如果还搞不定,(1)中内容第二步让你们勾选的那个不要勾,就没有问题了,我被这一步卡了好久好久

(2)新建项目:

&1.File==>New==>Spring Starter Project

&2.

(3)pom.xml报错:maven=>update maven project

(4)会有一个自动生成的以Application.java结尾的类

package com.wisely.ch5_2_3;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class Ch523Application {

	@RequestMapping("/")
	String index(){
		return "hello Spring Boot";
	}
	
	public static void main(String[] args) {
		SpringApplication.run(Ch523Application.class, args);
	}

}

(5)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

鹏哥哥啊Aaaa

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值