class UserController {

    @GetMapping("list")
    public List<User> list() throws Exception {
        String sql = "SELECT * FROM user";

        List<User> userList = jdbcTemplate.query(sql,
                new BeanPropertyRowMapper(User.class));
        return userList;
    }

}