use of org.springframework.jdbc.datasource.DriverManagerDataSource in project shiro by apache.
the class ApplicationConfig method dataSource.
/**
* Sample RDBMS data source that would exist in any application - not Shiro related.
* @return
*/
@Bean
protected DriverManagerDataSource dataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
dataSource.setUrl("jdbc:hsqldb:mem:shiro-spring");
dataSource.setUsername("sa");
return dataSource;
}
use of org.springframework.jdbc.datasource.DriverManagerDataSource in project survey by markoniemi.
the class JpaConfig method dataSource.
@Bean
public DataSource dataSource() {
// datasource is filled from database.properties, which is filled from survey/pom.xml
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(databaseDriver);
dataSource.setUrl(databaseUrl);
dataSource.setUsername(databaseUsername);
dataSource.setPassword(databasePassword);
return dataSource;
}
use of org.springframework.jdbc.datasource.DriverManagerDataSource in project runelite by runelite.
the class CacheConfiguration method dataSource.
@Bean
public DataSource dataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setUrl(jdbcUrl);
dataSource.setUsername(jdbcUsername);
dataSource.setPassword(jdbcPassword);
return dataSource;
}
use of org.springframework.jdbc.datasource.DriverManagerDataSource in project Gemma by PavlidisLab.
the class GoldenPath method init.
void init() {
assert databaseName != null;
DriverManagerDataSource dataSource = new DriverManagerDataSource();
this.url = "jdbc:mysql://" + host + ":" + port + "/" + databaseName + "?relaxAutoCommit=true";
GoldenPath.log.info("Connecting to " + databaseName);
GoldenPath.log.debug("Connecting to Golden Path : " + url + " as " + user);
dataSource.setDriverClassName(this.getDriver());
dataSource.setUrl(url);
dataSource.setUsername(user);
dataSource.setPassword(password);
jdbcTemplate = new JdbcTemplate(dataSource);
jdbcTemplate.setFetchSize(50);
}
use of org.springframework.jdbc.datasource.DriverManagerDataSource in project simple-java by angryziber.
the class JDBCPhotoSpotRepositoryIntegrationTest method initMockDB.
@Before
public void initMockDB() throws Exception {
repo.dataSource = new DriverManagerDataSource("jdbc:h2:mem:test", "sa", "sa");
conn = repo.dataSource.getConnection();
conn.createStatement().execute("create table PhotoSpot (id int auto_increment primary key, name varchar, description varchar, latitude float, longitude float)");
}
Aggregations