Spring和SpringBoot比较,解惑区别
Eclipse IDE下载
Eclipse IDE配置
SpringBoot项目的创建流程(初步)
PostMan设置
http://localhost:8080/
package com.example.test1;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@SpringBootApplication
public class Test1Application {
public static void main(String[] args) {
SpringApplicationBuilder builder = new SpringApplicationBuilder(Test1Application.class);
//修改Banner的模式为OFF
builder.bannerMode(Banner.Mode.OFF).run(args);
}
@RequestMapping(value = "/",produces = "text/plain;charset=UTF-8")
String index(){
return "Hello Brandon!";
}
}