Example usage for org.springframework.jdbc.core JdbcTemplate update

List of usage examples for org.springframework.jdbc.core JdbcTemplate update

Introduction

In this page you can find the example usage for org.springframework.jdbc.core JdbcTemplate update.

Prototype

@Override
    public int update(PreparedStatementCreator psc) throws DataAccessException 

Source Link

Usage

From source file:org.unitedinternet.cosmo.db.DbInitializer.java

public void executeStatements(String resource) {
    JdbcTemplate jdbcTemplate = new JdbcTemplate(this.datasource);
    for (String statement : this.readStatements(resource)) {
        LOG.info("\n" + statement);
        jdbcTemplate.update(statement);
    }//from   w w  w  . j ava2s .  c  o m
}