SpringMultidatabaseExample
Example for multi-database in Spring MVC
Required
- Java 8 (with JDK)
- Maven 3
- IntelliJ IDEA 2018+
Start Vagrant
cd _provisioning
vagrant up
- Vagrant box
SpringMultidatabaseExample
reboots after provisioning was successful
Install WAS (SpringMultidatabaseExample.war)
- after reboot, copy
SpringMultidatabaseExample.war
to/home/ec2-user/
- connect ssh
ssh root@[IP_ADDRESS]
sudo su
mv /home/ec2-user/SpringMultidatabaseExample.war /var/lib/tomcat8/webapps/
service tomcat8 restart
- open
http://[IP_ADDRESS]:8080/SpringMultidatabaseExample
References
http://fedulov.website/2015/10/14/dynamic-datasource-routing-with-spring/