1, above using the content of springMvc
package com.fandong.it.weapon.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,spring boot";
}
}
@Controller represents the controller comment
It returns a string that represents @ResponseBody json
@RequestMapping represents the path mapped plea.
----
Static resource file default path
The default file is in the Resources
resources/static
resources/META-INF/static
resources/public
--