class UserController {

    @GetMapping("getUserByName")
    public List getUserByName(String userName)throws Exception {
        String sql = "SELECT * FROM user WHERE USERNAME = ?";
        List<User> list = jdbcTemplate.query(sql, new User(), new Object[]{userName});
        return list;
    }

}