@Service publicclassUserServiceImplimplementsUserService{ @Autowired private JdbcTemplate jdbcTemplate; @Override publicvoidcreate(String name,String email){ jdbcTemplate.update("insert into USER (name,email) values (?,?)",name,email); } @Override publicvoidupdate(String name,int id){ jdbcTemplate.update("update USER (name ,id) where name =?,id=?",name,id); } @Override publicvoidsort(String name,int id){ jdbcTemplate.update("SELECT * FROM USER order by name ,id ASC ",name,id); } @Override publicintgetAllUsers(){ return jdbcTemplate.queryForObject("select * from USER",int.class); } @Override publicvoiddeleteAllUsers(){ jdbcTemplate.update("delete from USER"); } }