Example usage for org.springframework.jdbc.datasource DriverManagerDataSource setDriverClassName

List of usage examples for org.springframework.jdbc.datasource DriverManagerDataSource setDriverClassName

Introduction

In this page you can find the example usage for org.springframework.jdbc.datasource DriverManagerDataSource setDriverClassName.

Prototype

public void setDriverClassName(String driverClassName) 

Source Link

Document

Set the JDBC driver class name.

Usage

From source file:com.mac.abstractrepository.DataSourceConfiguration.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.postgresql.Driver");
    dataSource.setUrl("jdbc:postgresql://localhost:5432/entity");
    dataSource.setUsername("postgres");
    dataSource.setPassword("notorious");
    return dataSource;
}

From source file:net.lalotech.spring.mvc.config.PersistenceConfiguration.java

@Bean
public DataSource dataSource() {

    DriverManagerDataSource ds = new DriverManagerDataSource();
    ds.setDriverClassName(driver);
    ds.setUrl(url);//from w  ww  .j  ava 2 s .c  om
    ds.setUsername(username);
    ds.setPassword(password);
    return ds;
}

From source file:org.axiom_tools.data.DirectDataSource.java

@Bean
public DataSource dataSource() {
    getLogger().info(String.format(DirectDriver, driverClassName));
    getLogger().info(String.format(DirectURL, databaseURL));

    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(driverClassName);
    dataSource.setUsername(databaseUsername);
    dataSource.setPassword(databasePassword);
    dataSource.setUrl(databaseURL);//w  ww. j a  va 2 s .c  o  m
    return dataSource;
}

From source file:at.christophwurst.orm.config.AppConfig.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.mariadb.jdbc.Driver");
    dataSource.setUrl("jdbc:mysql://localhost/WorkLogDb");
    dataSource.setUsername("workloguser");
    dataSource.setPassword("worklogpassword");
    return dataSource;
}

From source file:at.christophwurst.orm.config.IntegrationalTestsConfig.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.apache.derby.jdbc.ClientDriver");
    dataSource.setUrl("jdbc:derby://localhost/WorkLogDb;create=true");
    dataSource.setUsername("user");
    dataSource.setPassword("test");
    return dataSource;
}

From source file:br.com.projetotcc.conf.JPAConfiguration.java

@Bean
public DataSource dataSource() {

    DriverManagerDataSource dataSource = new DriverManagerDataSource();

    dataSource.setDriverClassName("com.mysql.jdbc.Driver");
    dataSource.setUrl("jdbc:mysql://localhost:3306/projetotcc");
    dataSource.setUsername("root");
    dataSource.setPassword("");
    return dataSource;
}

From source file:com.mycompany.swing2explore.config.PersistenceJPAConfig.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("com.mysql.jdbc.Driver");
    dataSource.setUrl("jdbc:mysql://localhost:3306/spring2explore");
    dataSource.setUsername("root");
    dataSource.setPassword("pwdroot");
    return dataSource;
}

From source file:com.project.framework.configuration.DBConfig.java

@Bean
public DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(env.getProperty("postgresql.driver"));
    dataSource.setUrl(env.getProperty("postgresql.url"));
    dataSource.setUsername(env.getProperty("postgresql.username"));
    dataSource.setPassword(env.getProperty("postgresql.password"));
    return dataSource;
}

From source file:com.qpark.eip.core.spring.lockedoperation.TestConfig.java

/**
 * Get the {@link DataSource} auto wired in the
 * {@link EipLockedoperationConfig}.//from   w w w . ja v  a2  s . c  o m
 *
 * @return The {@link DataSource}
 */
@Bean(name = EipLockedoperationConfig.DATASOURCE_BEAN_NAME)
public DataSource DataSource() {
    DriverManagerDataSource bean = new DriverManagerDataSource();
    bean.setDriverClassName("org.hsqldb.jdbc.JDBCDriver");
    bean.setUrl("jdbc:hsqldb:file:target/hsqldb/testHSQLDB.bin");
    bean.setUsername("platformUser");
    bean.setPassword("platformUserPwd");
    return bean;
}

From source file:com.anuz.dummyapi.config.HibernateConfig.java

@Bean()
public DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(driverClassName);
    dataSource.setUrl(url);/*ww w .  j a  va 2 s . c om*/
    dataSource.setUsername(username);
    dataSource.setPassword(password);
    return dataSource;
}