官网在线springboot项目的搭建

springboot 简介:
对于Java语言来说,现在市场上最流行的框架是SSM(springMVC+spring+mybatis)。但是SSM搭建的过程中,比较复杂!springboot的出现,大大加快了SSM框架搭建速度!而且其简化的代码,简化的配置,简化的监控,简化的部署!让我们对springboot爱不释手!相当于SSM的手工的,而springboot是自动的!
一、官网创建springboot项目
1.打开官网https://start.spring.io/
官网在线springboot的搭建
2、解压下载的zip文件到指定的工作目录
官网在线springboot的搭建
3、使用idea或者eclipse,以导入maven项目的方式导入刚刚解压开的项目。
官网在线springboot的搭建
4、添加一个简单的controller

package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
	
	@RequestMapping("/hello")
	public String hello() {
		return "hello!this is my first Springboot project";
	}
}

6.运行DemoApplication的main方法,打开浏览器http://localhost:8080/hello
官网在线springboot的搭建
官网在线springboot的搭建

相关文章:

  • 2021-10-22
  • 2021-12-06
  • 2021-04-06
  • 2022-12-23
  • 2022-02-09
  • 2022-01-09
  • 2021-05-03
猜你喜欢
  • 2022-02-15
  • 2021-09-04
  • 2021-11-27
  • 2022-02-08
  • 2021-04-28
  • 2021-09-30
  • 2021-12-30
相关资源
相似解决方案