一、SpringBootApplication注解
//@EnableAutoConfiguration //@ComponentScan("com.wuxi") //********等价******** @SpringBootApplication(scanBasePackages = {"com.wuxi"})//默认情况下扫描的是当前包及当前包的子包
二、RestController注解
//@ Controller @RestController // Restful风格,等价@Controller+@ResponseBody public class IndexController { @RequestMapping("/lin/{id}") // @ResponseBody public Object requestFun(@PathVariable String id) { return id; } }