List of usage examples for org.springframework.jdbc.datasource DriverManagerDataSource setUrl
public void setUrl(@Nullable String url)
From source file:net.lalotech.spring.mvc.config.PersistenceConfiguration.java
@Bean public DataSource dataSource() { DriverManagerDataSource ds = new DriverManagerDataSource(); ds.setDriverClassName(driver);/*from w w w . j a v a 2 s .c om*/ ds.setUrl(url); ds.setUsername(username); ds.setPassword(password); return ds; }
From source file:se.kth.csc.config.SettingsDataSourceConfig.java
@Bean @Override/*from w w w .ja v a 2 s . c om*/ public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(driver); dataSource.setUrl(url); dataSource.setUsername(username); dataSource.setPassword(password); log.info("Creating data source with JDBC driver {}, connecting to {} as user {}", driver, url, username); return dataSource; }
From source file:info.smartkit.hairy_batman.config.DbConfiguration.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(databaseDriver); dataSource.setUrl(databaseUrl); dataSource.setUsername(databaseUsername); dataSource.setPassword(databasePassword); return dataSource; }
From source file:contact.config.MvcConfiguration.java
@Bean public DataSource getDataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost:3306/contactdb"); dataSource.setUsername("root"); dataSource.setPassword(""); return dataSource; }
From source file:com.examplee.AppConfig.java
@Bean(name = "dataSource") public DriverManagerDataSource dataSource() { DriverManagerDataSource driverManagerDataSource = new DriverManagerDataSource(); driverManagerDataSource.setDriverClassName("com.mysql.jdbc.Driver"); driverManagerDataSource.setUrl("jdbc:mysql://localhost:3306/products"); driverManagerDataSource.setUsername("root"); driverManagerDataSource.setPassword("Krak1234#"); return driverManagerDataSource; }
From source file:com.iopr.PersistenceJPAConfig.java
@Bean public DataSource dataSource() { DBResource dbr = new DBResource(); DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(dbr.getJdbcDriver()); dataSource.setUrl(dbr.getJdbcConnectionString()); dataSource.setUsername(dbr.getDbUser()); dataSource.setPassword(dbr.getDbPassword()); return dataSource; }
From source file:com.navita.mavenproject4.config.JpaConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource1 = new DriverManagerDataSource(); dataSource1.setDriverClassName("com.mysql.jdbc.Driver"); dataSource1.setUrl("jdbc:mysql://localhost:3306/testCase"); dataSource1.setUsername("root"); dataSource1.setPassword(""); return dataSource1; }
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:rd.kpath.config.MainConfig.java
@Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost/social"); dataSource.setUsername("root"); dataSource.setPassword("123"); return dataSource; }
From source file:com.xinferin.config.MvcConfiguration.java
@Bean public DataSource getDataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.jdbc.Driver"); dataSource.setUrl("jdbc:mysql://localhost:3306/xlicenser"); dataSource.setUsername("root"); dataSource.setPassword("x1nfer1n"); return dataSource; }