SpringMultidatabaseExample

Example for multi-database in Spring MVC

Required

  1. Java 8 (with JDK)
  2. Maven 3
  3. IntelliJ IDEA 2018+

Start Vagrant

  1. cd _provisioning
  2. vagrant up
  3. Vagrant box SpringMultidatabaseExample reboots after provisioning was successful

Install WAS (SpringMultidatabaseExample.war)

  1. after reboot, copy SpringMultidatabaseExample.war to /home/ec2-user/
  2. connect ssh ssh root@[IP_ADDRESS]
  3. sudo su
  4. mv /home/ec2-user/SpringMultidatabaseExample.war /var/lib/tomcat8/webapps/
  5. service tomcat8 restart
  6. open http://[IP_ADDRESS]:8080/SpringMultidatabaseExample

References

http://fedulov.website/2015/10/14/dynamic-datasource-routing-with-spring/