class UserController {

    @GetMapping("getUserById")
    public User getUserById(Integer id) throws Exception {
        String sql = "SELECT * FROM user WHERE ID = ?";
        User user = jdbcTemplate.queryForObject(sql, new User(), new Object[]{id});
        return user;
    }

}