Spring and Dynamic Datasource

Asked

Viewed 12 times

1

I have two database Structures, example:

1- MAIN_DATABASE: USER PASSWORD

2: CUSTOMER DATABASE: CUSTOMER_A CUSTOMER_B CUSTOMER_C

I want to access the main database and after validating the data, redirect to the Customer database.

I Currently use spring and configure it in applicationContext.xml

Example:

<bean id = "encryptionPassword" class = "utils.EncryptionPasswordSpring" />
<bean id = "dataSource" class = "com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method = "close">
<property name = "driverClass" value = "com.mysql.jdbc.Driver" />
<property name = "user" value = "user" />
<property name = "password" value = "123456" />
<property name = "jdbcUrl" value = "jdbc: mysql: // localhost / testdb? useSSL = false" />
</bean>

Any example, suggestion? Thanks.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.