|
|
|
@ -23,6 +23,7 @@ import java.util.Properties; |
|
|
|
@EnableTransactionManagement |
|
|
|
public class DataSourceConfig { |
|
|
|
|
|
|
|
//////////////////////////////(For GCC APP) //////////////////////// |
|
|
|
@Configuration |
|
|
|
@EnableTransactionManagement |
|
|
|
@EnableJpaRepositories( |
|
|
|
@ -69,6 +70,7 @@ public class DataSourceConfig { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//////////////////////////////(For Tax Collection 1913) //////////////////////// |
|
|
|
@Configuration |
|
|
|
@EnableTransactionManagement |
|
|
|
@EnableJpaRepositories( |
|
|
|
@ -86,12 +88,7 @@ public class DataSourceConfig { |
|
|
|
dataSource.setPassword(""); |
|
|
|
return dataSource; |
|
|
|
} |
|
|
|
/* |
|
|
|
@Bean(name = "mysqlTaxCollectionJdbcTemplate") |
|
|
|
public JdbcTemplate mysqlTaxCollectionJdbcTemplate(@Qualifier("mysqlTaxCollectionDataSource") DataSource dataSource) { |
|
|
|
return new JdbcTemplate(dataSource); |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
@Bean(name="taxEntityManagerFactory") |
|
|
|
public LocalContainerEntityManagerFactoryBean taxEntityManagerFactory( |
|
|
|
@Qualifier("mysqlTaxCollectionDataSource") DataSource dataSource) { |
|
|
|
@ -112,6 +109,42 @@ public class DataSourceConfig { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////(For Mayor Petition) //////////////////////// |
|
|
|
@Bean(name = "mysqlMayorPetitionDataSource") |
|
|
|
public DataSource mysqlMayorPetitionDataSource() { |
|
|
|
DriverManagerDataSource dataSource = new DriverManagerDataSource(); |
|
|
|
dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); |
|
|
|
dataSource.setUrl("jdbc:mysql://localhost:3306/mayor_petition"); |
|
|
|
dataSource.setUsername("root"); |
|
|
|
dataSource.setPassword(""); |
|
|
|
return dataSource; |
|
|
|
} |
|
|
|
|
|
|
|
//////////////////////////////(For Petition Master) //////////////////////// |
|
|
|
@Bean(name = "mysqlPetitionMasterDataSource") |
|
|
|
public DataSource mysqlPetitionMasterDataSource() { |
|
|
|
DriverManagerDataSource dataSource = new DriverManagerDataSource(); |
|
|
|
dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); |
|
|
|
dataSource.setUrl("jdbc:mysql://localhost:3306/petition_master"); |
|
|
|
dataSource.setUsername("root"); |
|
|
|
dataSource.setPassword(""); |
|
|
|
return dataSource; |
|
|
|
} |
|
|
|
|
|
|
|
//////////////////////////////(For Councillor Petition) //////////////////////// |
|
|
|
@Bean(name = "mysqlCouncillorPetitionDataSource") |
|
|
|
public DataSource mysqlCouncillorPetitionDataSource() { |
|
|
|
DriverManagerDataSource dataSource = new DriverManagerDataSource(); |
|
|
|
dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); |
|
|
|
dataSource.setUrl("jdbc:mysql://localhost:3306/councillor_petition"); |
|
|
|
dataSource.setUsername("root"); |
|
|
|
dataSource.setPassword(""); |
|
|
|
return dataSource; |
|
|
|
} |
|
|
|
|
|
|
|
////////////////////////////// ORACLE //////////////////////// |
|
|
|
@Bean(name = "oracleDataSource") |
|
|
|
public DataSource oracleDataSource() { |
|
|
|
DriverManagerDataSource dataSource = new DriverManagerDataSource(); |
|
|
|
|