Java Code Examples for org.springframework.jdbc.datasource.SimpleDriverDataSource#setUsername()

The following examples show how to use org.springframework.jdbc.datasource.SimpleDriverDataSource#setUsername() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DatabaseConfiguration.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
  SimpleDriverDataSource ds = new SimpleDriverDataSource();
  ds.setDriverClass(org.h2.Driver.class);

  // Connection settings
  ds.setUrl("jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000");
  ds.setUsername("sa");

  return ds;
}
 
Example 2
Source File: ActivitiEngineConfiguration.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
  SimpleDriverDataSource ds = new SimpleDriverDataSource();
  ds.setDriverClass(org.h2.Driver.class);

  // Connection settings
  ds.setUrl("jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000");
  ds.setUsername("sa");

  return ds;
}
 
Example 3
Source File: EngineConfiguration.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
    SimpleDriverDataSource ds = new SimpleDriverDataSource();
    ds.setDriverClass(jdbcDriver);

    // Connection settings
    ds.setUrl("jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000");
    ds.setUsername(jdbcUsername);
    ds.setPassword(jdbcPassword);

    return ds;
}
 
Example 4
Source File: EngineConfiguration.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
    SimpleDriverDataSource ds = new SimpleDriverDataSource();
    ds.setDriverClass(jdbcDriver);

    // Connection settings
    ds.setUrl("jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000");
    ds.setUsername(jdbcUsername);
    ds.setPassword(jdbcPassword);

    return ds;
}
 
Example 5
Source File: DatabaseConfiguration.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
    SimpleDriverDataSource ds = new SimpleDriverDataSource();
    ds.setDriverClass(org.h2.Driver.class);

    // Connection settings
    ds.setUrl("jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000");
    ds.setUsername("sa");

    return ds;
}
 
Example 6
Source File: EngineConfiguration.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
    SimpleDriverDataSource ds = new SimpleDriverDataSource();
    ds.setDriverClass(jdbcDriver);

    // Connection settings
    ds.setUrl("jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000");
    ds.setUsername(jdbcUsername);
    ds.setPassword(jdbcPassword);

    return ds;
}
 
Example 7
Source File: EngineConfiguration.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Bean
public DataSource dataSource() {
    SimpleDriverDataSource ds = new SimpleDriverDataSource();
    ds.setDriverClass(jdbcDriver);

    // Connection settings
    ds.setUrl("jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000");
    ds.setUsername(jdbcUsername);
    ds.setPassword(jdbcPassword);

    return ds;
}
 
Example 8
Source File: InitProcessEngineBySpringAnnotation.java    From activiti-in-action-codes with Apache License 2.0 5 votes vote down vote up
/**
 * 定义数据源
 * @return
 * @throws ClassNotFoundException
 */
@Bean
public DataSource dataSource() throws ClassNotFoundException {
    SimpleDriverDataSource simpleDriverDataSource = new SimpleDriverDataSource();
    simpleDriverDataSource.setDriverClass((Class<? extends Driver>) Class.forName("org.h2.Driver"));
    simpleDriverDataSource.setUrl("jdbc:h2:mem:aia-chapter7;DB_CLOSE_DELAY=1000");
    simpleDriverDataSource.setUsername("sa");
    simpleDriverDataSource.setPassword("");
    return simpleDriverDataSource;
}
 
Example 9
Source File: TransactionalTestConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public DataSource getDataSource() {
    SimpleDriverDataSource simpleDriverDataSource = new SimpleDriverDataSource();
    simpleDriverDataSource.setDriverClass(org.hsqldb.jdbcDriver.class);
    simpleDriverDataSource.setUrl("jdbc:hsqldb:mem:app-db");
    simpleDriverDataSource.setUsername("sa");
    simpleDriverDataSource.setPassword("");
    return simpleDriverDataSource;
}