使用java的REST API AWS云 [英] REST API AWS cloud using java

查看:364
本文介绍了使用java的REST API AWS云的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 AWS 的新手,想要开发云就绪的Java应用 REST API

I am new to AWS , want to develop a cloud ready java application REST API.

应用程序将点击 MySQL 数据库,并在查询数据库后生成 JSON 输出。

The application will hit the MySQL database and produce output as JSON after querying the database.

IP:端口/应用程序?q =< query> 响应是JSON。

如何实现呢? MySQL 中的数据主要是静态 100MB 数据,但经常使用。

How to achieve it ? the data in MySQL is mostly static 100MB data but used very frequently.

推荐答案

非常直截了当。如果您已在本地系统中运行相同的应用程序,则可以使用以下步骤将其移至AWS: -

It is very straight forward. if you already have same application running in your local system , then you can just move it to AWS , using below steps :-


  1. 启动新的ec2实例,如果您使用的是免费套餐,那么您可以免费提供大量AWS资源,有关 https://aws.amazon.com/free/

安装所有必需的s / w,如Java,maven ,tomcat和mysql以及你的应用程序在Ec2实例上使用的任何内容。您甚至可以在免费层中拥有一个免费的RDS(数据库)实例,您可以将其用于您的应用程序,而不是在您的应用程序服务器上本地安装数据库。

install all the required s/w like Java, maven , tomcat and mysql and whatever your application is using on Ec2 instance . you can even have a free RDS (Database) instance in free tier which you can use for your application , instead of having the database installed locally on your application server.

在创建ec2服务器时,正确配置实例安全组,ex 8080用于http,22用于SSH,3306用于mysql等。(这很重要,尽量使其成为可以使其免受黑客攻击的重建)。

while creating the ec2 server , configure instance security group properly for ex 8080 for http and 22 for SSH , 3306 for mysql etc. (This is important and try to be as restrtict as possible to make it safe from hackers).

构建和部署应用程序并使用任何REST客户端访问它,方法是提供实例ip和应用程序端口号。

build and deploy your application and access it using any REST client , by giving instance ip and application port number.

AWS有多种在线资源,您可以参考 https://www.youtube.com/watch?v=oS7VYX7LXUo ,讨论将Java应用程序部署到AWS。

There are several resources online for AWS , you can refer https://www.youtube.com/watch?v=oS7VYX7LXUo which talks about deploying a java application to AWS.

告诉我如果您需要任何其他信息。

Let me know if you need any other information.

这篇关于使用java的REST API AWS云的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆