Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 701 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 701 Bytes

springboot_1_hello world

springboot demo

hello world

@RestController
@SpringBootApplication
public class DemoApplication {

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

	@RequestMapping({ "/", "/index" ,""})
	public String index(){
		return "hello springboot";
	}

	@RequestMapping("json")
	public Map json(){
		Map m=new HashMap();
		m.put("index1","str1");
		m.put("index2","str2");
		m.put("index3","str3");
		return m;
	}
}

index

json