==================================================================
===================================================================
============================================================================================
jdk-1.8
true
1.8
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
=========================================================================================
org.springframework.boot
spring-boot-starter-parent
2.2.2.RELEASE
org.springframework.boot
spring-boot-starter-web
package com;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//来标注一个主程序类,说明这是一个springBoot应用程序
@SpringBootApplication
public class Hello {
public static void main(String[] args)
{
//spring应用启动起来
SpringApplication.run(Hello.class,args);
}
}
package com.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class HelloController {
@ResponseBody
@RequestMapping("/hello")
public String hello()
{
return “hello world”;
}
}
5.运行主程序测试
org.springframework.boot
spring-boot-maven-plugin
命令行使用java -jar的命令执行这个jar包即可,记住先要来到当前jar包对应的目录,通过cd 目录路径–》来到对应目录
====================================================&#