List of usage examples for org.springframework.jdbc.datasource DriverManagerDataSource setUsername
public void setUsername(@Nullable String username)
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:es.galvarez.rest.config.SpringConfiguration.java
@Bean public DataSource configureDataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(driver); dataSource.setUrl(url);// w ww . j a v a2s . c o m dataSource.setUsername(username); dataSource.setPassword(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 . j av a 2s . c om * * @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:br.com.joaops.awc.configuration.PersistenceConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("org.postgresql.Driver"); dataSource.setUrl("jdbc:postgresql://localhost/awc"); dataSource.setUsername("postgres"); dataSource.setPassword("postgres"); return dataSource; }
From source file:mg.jerytodik.business.config.JeryTodikConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource ds = new DriverManagerDataSource(); ds.setDriverClassName(env.getProperty("db.driver")); ds.setUrl(env.getProperty("db.url")); ds.setUsername(env.getProperty("db.username")); ds.setPassword(env.getProperty("db.password")); return ds;//from w w w.ja v a 2 s . c o m }
From source file:uk.ac.ebi.ep.data.testConfig.SpringDataMockConfig.java
@Bean public DataSource defaultDataSource() throws SQLException { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("org.h2.Driver"); dataSource.setUrl("jdbc:h2:mem:enzymePortal"); dataSource.setUsername("sa");//not important to secure dataSource.setPassword("");//default - not important to secure 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 ww . j av a2 s . com */ @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:org.hellospring4.config.PersistenceConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://192.168.1.75:3306/MUSICOPY"); dataSource.setUsername("springtest"); dataSource.setPassword("test"); 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.mycompany.spring2explore.config.PersistenceJPAConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("org.postgresql.Driver"); dataSource.setUrl("jdbc:postgresql://127.0.0.1:5432/mydb"); dataSource.setUsername("postgres"); dataSource.setPassword("pwdpsql"); return dataSource; }