简体   繁体   中英

How to deploy java spring restful service on AWS based on tomcat server with mysql database?

I have restful spring web service running on tomcat server and have mysql database on backend. I deployed war file of my service using aws elastic beanstalk free account yet but I am unable to setup mysql database. Can anyone guide me on this matter ? Secondly, our application has android side code which will call my REST API so is there any other way to do this instead of setting up amazon web services for testing purposes ?

You are going the right way; Android should call REST APIs. These APIs can be implemented in following ways:

  1. As you suggested; use spring on tomcat to expose such apis.

  2. Use API Gateway exposed by AWS. This api gateway can even call lambda expressions in backend which can be written in Java/Python etc.

I will suggest you to go ahead with 1 as u are already aware of spring/tomcat etc. and MOST companies use this only.

For MySQL database you have following options:

  1. Install MySQL on your local EC2 server ( where you have tomcat running ); or on another EC2 server.

  2. You can use MySQL as a service which is RDS. It is expensive but easy to configure.

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