List of usage examples for org.springframework.jdbc.datasource DriverManagerDataSource setPassword
public void setPassword(@Nullable String password)
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 ww . ja va 2 s . c o m }
From source file:org.dspace.orm.DSpaceDataSourceBuilder.java
public DriverManagerDataSource createInstall(DatabaseInformation information) { DriverManagerDataSource driver = new DriverManagerDataSource(); driver = new DriverManagerDataSource(); driver.setDriverClassName(information.getDriverClass().getName()); driver.setUrl(information.getURL()); driver.setUsername(information.getUser()); driver.setPassword(information.getPass()); return driver; }
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: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.itn.configuration.HibernateConfiguration.java
@Bean public DataSource ds() { DriverManagerDataSource dm = new DriverManagerDataSource(); dm.setDriverClassName(env.getRequiredProperty("hibernate.driver_class")); dm.setUrl(env.getRequiredProperty("hibernate.url")); dm.setUsername(env.getRequiredProperty("hibernate.username")); dm.setPassword(env.getRequiredProperty("hibernate.password")); return dm;/*from w w w. ja v a2 s . c om*/ }
From source file:io.spring.JpaApplicationTests.java
@Before public void setup() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(DATASOURCE_DRIVER_CLASS_NAME); dataSource.setUrl(DATASOURCE_URL); dataSource.setUsername(DATASOURCE_USER_NAME); dataSource.setPassword(DATASOURCE_USER_PASSWORD); this.dataSource = dataSource; try {//from w w w. j ava2 s . c o m this.server = Server.createTcpServer("-tcp", "-tcpAllowOthers", "-tcpPort", String.valueOf(randomPort)) .start(); } catch (SQLException e) { throw new IllegalStateException(e); } }
From source file:uk.ac.ebi.eva.pipeline.configuration.PostgreDataSourceConfiguration.java
@Bean @Primary//from w w w . j av a 2s . co 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:se.omegapoint.facepalm.client.config.DatabaseConfig.java
@Bean public DataSource dataSource() { final DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(env.getProperty("db.driver")); dataSource.setUrl(env.getProperty("db.url")); dataSource.setUsername(env.getProperty("db.username")); dataSource.setPassword(env.getProperty("db.password")); final Properties properties = new Properties(); dataSource.setConnectionProperties(properties); return dataSource; }
From source file:com.aerolinea.config.WebConfig.java
@Bean public DriverManagerDataSource restDataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost:3306/aerolinea?zeroDateTimeBehavior=convertToNull"); dataSource.setUsername("root"); dataSource.setPassword("tic506"); return dataSource; }
From source file:com.opencart.config.SpringConfigurations.java
@Bean public DataSource dataSource() { DriverManagerDataSource datasource = new DriverManagerDataSource(); datasource.setDriverClassName("oracle.jdbc.OracleDriver"); datasource.setUrl("jdbc:oracle:thin:@dilbert.humber.ca:1521:grok"); datasource.setUsername("n01072473"); datasource.setPassword("oracle"); return datasource; }