Search in sources :

Example 16 with DriverManagerDataSource

use of org.springframework.jdbc.datasource.DriverManagerDataSource in project av-service by dvoraka.

the class DbConfig method dataSource.

@Bean
public DataSource dataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(env.getProperty("avservice.db.driver"));
    dataSource.setUrl(env.getProperty("avservice.db.url"));
    dataSource.setUsername(env.getProperty("avservice.db.user"));
    dataSource.setPassword(env.getProperty("avservice.db.pass"));
    return dataSource;
}
Also used : DriverManagerDataSource(org.springframework.jdbc.datasource.DriverManagerDataSource) Bean(org.springframework.context.annotation.Bean) LocalContainerEntityManagerFactoryBean(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

Aggregations

DriverManagerDataSource (org.springframework.jdbc.datasource.DriverManagerDataSource)16 Test (org.junit.Test)8 DataSource (javax.sql.DataSource)4 Bean (org.springframework.context.annotation.Bean)3 SQLException (java.sql.SQLException)2 Matcher (java.util.regex.Matcher)2 Pattern (java.util.regex.Pattern)2 PersistenceUnitInfo (javax.persistence.spi.PersistenceUnitInfo)2 Before (org.junit.Before)2 ApplicationContextHolder (org.mifos.application.servicefacade.ApplicationContextHolder)2 ApplicationContext (org.springframework.context.ApplicationContext)2 PathMatchingResourcePatternResolver (org.springframework.core.io.support.PathMatchingResourcePatternResolver)2 SqlParameter (org.springframework.jdbc.core.SqlParameter)2 BufferedReader (java.io.BufferedReader)1 File (java.io.File)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 PrintWriter (java.io.PrintWriter)1 Connection (java.sql.Connection)1 ArrayList (java.util.ArrayList)1