玩转Spring全家桶

编写你的第一个Spring程序

方法一:

  1. start spring初始化spring项目。

image-20220921115008978
image-20220921115008978

  1. 进行项目配置

image-20220921115346362
image-20220921115346362

  1. 下载项目

    image-20220921115745535
    image-20220921115745535

  2. 解压项目,导入Idea

image-20220921115929364
image-20220921115929364

  1. 选择项目路径

image-20220921120135196
image-20220921120135196

image-20220921120202320
image-20220921120202320

  1. 完成!

image-20220921121003629
image-20220921121003629

方法二:

image-20220921121121973
image-20220921121121973

image-20220921121209836
image-20220921121209836

image-20220921121424859
image-20220921121424859

image-20220921121541012
image-20220921121541012

hello demo code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
package cc.hiifong.fullspring;

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 FullSpringApplication {

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

    @RequestMapping("/hello")
    public String hello() {
        return "Hello Spring";
    }
}

image-20220921123459958
image-20220921123459958

0%