spring jdbc test

spring jdbc test

 

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
    
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <scope>runtime</scope>
</dependency>

 

JdbcTemplate jdbcTemplate;
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);

 

 

#########################

posted @ 2021-12-11 19:53  西北逍遥  阅读(52)  评论(0编辑  收藏  举报