List of usage examples for org.springframework.jdbc.datasource DriverManagerDataSource setPassword
public void setPassword(@Nullable String password)
From source file:be.wolkmaan.klimtoren.web.config.PersistenceConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource ds = new DriverManagerDataSource(); ds.setDriverClassName(env.getProperty("jdbc.driverClassName")); ds.setUrl(env.getProperty("jdbc.url")); ds.setUsername(env.getProperty("jdbc.username")); ds.setPassword(env.getProperty("jdbc.password")); return ds;/*from ww w. ja v a 2s . c om*/ }
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.xiovr.unibot.config.JdbcConfig.java
/** * @return create bean for jdbc driver/*w w w .j a v a 2 s .c o m*/ */ @Bean(name = "dataSource") public DataSource getDataSource() { DriverManagerDataSource ds = new DriverManagerDataSource(); ds.setDriverClassName(env.getProperty("jdbc.driverClassName")); ds.setUrl(env.getProperty("jdbc.url")); ds.setUsername(env.getProperty("jdbc.username")); ds.setPassword(env.getProperty("jdbc.password")); return ds; // EmbeddedDatabaseBuilder edb = new EmbeddedDatabaseBuilder(); // edb.setType(EmbeddedDatabaseType.HSQL). // setName("e5botdb"). // addScripts("classpath:/sql/hsql_create.sql", // "classpath:/sql/hsql_data.sql"); // return edb.build(); }
From source file:nl.avans.ivh5a1.proftaak.config.PersistenceContext.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(PROPERTY_NAME_DATABASE_DRIVER); dataSource.setUrl(PROPERTY_NAME_DATABASE_URL); dataSource.setUsername(PROPERTY_NAME_DATABASE_USERNAME); dataSource.setPassword(PROPERTY_NAME_DATABASE_PASSWORD); 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: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:es.galvarez.rest.config.SpringConfiguration.java
@Bean public DataSource configureDataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(driver); dataSource.setUrl(url);//from ww w . ja v a2 s .co 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 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.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.qpark.eip.core.model.analysis.config.ModelAnalysisPersistence.java
/** * Get the {@link DataSource} auto wired in the * {@link EipModelAnalysisPersistenceConfig}. * * @return The {@link DataSource}//from w w w . j a v a 2 s .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; }