第一个 JdbcTemplate 启动应用程序
@SpringBootApplication
@RestController
public class SpringBootJdbcApplication {
@Autowired
private JdbcTemplate template;
@RequestMapping("/cars")
public List<Map<String,Object>> stocks(){
return template.queryForList("select * from car");
}
public static void main(String[] args) {
SpringApplication.run(SpringBootJdbcApplication.class, args);
}
}