简体   繁体   中英

Java Web Application connect to MYSQL and SQL SERVER

I have a SpringMvc Web App running perfectly on a tomcat server alongside MySql. What i need to do is that i need to store some data to another database on a SQL Server in another hosting.

So i am wondering if a spring mvc project has the capability to have simultaneously an MySql connection and SQL Server connection. If not what could you advice me since i need to copy the contents of the mysql to sql every once in a while (say for instance in an interval of 2h).

Thanks

You can create two different DataSources with respective Drivers and Connection Credentials. It should work fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM