📜  spring 5 jdbctemplate 查询单个值 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:43.140000             🧑  作者: Mango

代码示例2
String result = DataAccessUtils.singleResult(
    jdbcTemplate.queryForList(
        "SELECT street_name FROM table WHERE id = :id",
        Collections.singletonMap("id", id),
        String.class
    )
)