@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);
}
}