・ The latest version of Eclipse
① How to install eclips https://snome.jp/framework/springboot-install-win/ Completed before using Spring Boot The mystery of the workspace? Eclipse will create a hidden directory called “.metadata” in the directory designated as the workspace, so search for it. ② Java compiler settings No need to set anything ③ How to create WEB API Change Maven's POM based on the sample https://codezine.jp/article/detail/11380?p=3 ④ Java Spring Boot JSON sending and receiving sample https://itsakura.com/java-springboot-json#s7 How to put out Hello World https://qiita.com/kuro227/items/d7da647e9f3be78a5f92 URL to access http://localhost:8081/hello/ Reference API spring https://spring.pleiades.io/guides/tutorials/bookmarks/ Maven's POM https://mvnrepository.com/search?q=javax.validation Create a web api server with spring boot https://qiita.com/kuro227/items/d7da647e9f3be78a5f92 Correction points ・HelloWorldController.java ・Syain.java
File (test.html)
Mapping with
@RequestMapping(method = RequestMethod.GET)
public String getHello() {
return "hello world!";
}
file:///C:/Users/shimizu/Desktop/test2.html
Mapped here
@RequestMapping(value = "/index",method = {RequestMethod.POST})
@ResponseBody
public Syain output1(
@RequestBody Syain syain) {
System.out.println(syain.getBangou());
System.out.println(syain.getName());
return syain;
}
Recommended Posts