Spring Boot笔记--Spring Boot相关介绍+快速入门

相关介绍

简化了Spring开发,避免了Spring开发的繁琐过程

提供了自动配置、起步依赖、辅助功能

快速入门

结果呈现:

相关过程:

helloController.java

package org.example;

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

@RestController
public class helloController {

    @RequestMapping("/hello")
    public String getSaying(){
        return "Hello SpringBoot!";
    }
}

Main.java

@SpringBootApplication
public class Main {
    public static void main(String[] args) {
        SpringApplication.run(Main.class,args);
    }
}

控制台体现:

pom.xml相关依赖

posted @ 2023-01-06 16:44  yesyes1  阅读(12)  评论(0编辑  收藏  举报