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

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

Introduction

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

Prototype

public void setUrl(@Nullable String url) 

Source Link

Document

Set the JDBC URL to use for connecting through the Driver.

Usage

From source file:reviewbot.configuration.DatabaseConfig.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(DB_DRIVER);
    dataSource.setUrl(DB_URL);
    dataSource.setUsername(DB_USERNAME);
    dataSource.setPassword(DB_PASSWORD);
    return dataSource;
}

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

@Bean()
public DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(driverClassName);
    dataSource.setUrl(url);
    dataSource.setUsername(username);//from   www .  j  av a 2  s.c o m
    dataSource.setPassword(password);
    return dataSource;
}

From source file:com.store.PersistenceJPAConfig.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("com.mysql.jdbc.Driver");
    dataSource.setUrl("jdbc:mysql://127.0.0.1/simplestoredba");
    dataSource.setUsername("userstore");
    dataSource.setPassword("u$3r$t0r3");
    return dataSource;
}

From source file:com.qpark.eip.core.model.analysis.config.ModelAnalysisPersistence.java

/**
 * Get the {@link DataSource} auto wired in the
 * {@link EipModelAnalysisPersistenceConfig}.
 *
 * @return The {@link DataSource}/*  w w w . ja v  a 2s .  c o m*/
 */
@Bean(name = EipModelAnalysisPersistenceConfig.DATASOURCE_BEAN_NAME)
public DataSource getDataSource() {
    DriverManagerDataSource bean = new DriverManagerDataSource();
    bean.setDriverClassName("org.hsqldb.jdbc.JDBCDriver");
    bean.setUrl("jdbc:hsqldb:file:src/test/hsqldb/domainDocHSQLDB.bin");
    bean.setUsername("platformUser");
    bean.setPassword("platformUserPwd");
    return bean;
}

From source file:com.space.data.DomainStoreConfiguration.java

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

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:com.sg.domain.jpa.spring.PersistenceContextConfig.java

@Bean
DataSource dataSource() {// w  ww .  ja  v  a2  s .  c o m
    DriverManagerDataSource ds = new DriverManagerDataSource();
    ds.setDriverClassName(driverClassName);
    ds.setUrl(jdbcUrl);
    ds.setUsername(username);
    ds.setPassword(password);
    return ds;
}

From source file:uk.ac.ebi.eva.pipeline.configuration.PostgreDataSourceConfiguration.java

@Bean
@Primary//w w w  .  ja  v a 2  s .c  o  m
public DataSource postgreDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(env.getProperty("job.repository.driverClassName"));
    dataSource.setUrl(env.getProperty("job.repository.url"));
    dataSource.setUsername(env.getProperty("job.repository.username"));
    dataSource.setPassword(env.getProperty("job.repository.password"));
    return dataSource;
}

From source file:br.com.joaops.springdatajpajavaconfigfirebird.configuration.DataConfiguration.java

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.firebirdsql.jdbc.FBDriver");
    dataSource.setUrl("jdbc:firebirdsql://localhost:3050/C:/BancoDados/BookStore.fdb");
    dataSource.setUsername("SYSDBA");
    dataSource.setPassword("masterkey");
    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;
}