简体   繁体   English

将Spring Boot REST API jar文件放在Ubuntu EC2实例上的哪里?

[英]Where do I put my Spring Boot REST API jar file on my Ubuntu EC2 instance?

I have an Ubuntu EC2 instance on which I want to place a Spring Boot REST API jar file, which I've built on my computer. 我有一个我要在计算机上构建的Spring Boot REST API jar文件的Ubuntu EC2实例。 I'm going to use Filezilla to transfer the jar file over SFTP to my Ubuntu EC2 instance. 我将使用Filezilla通过SFTP将jar文件传输到我的Ubuntu EC2实例。 Does it need to go into a certain directory if I want to use that EC2 instance for sending HTTP request to the REST API? 如果我想使用该EC2实例向REST API发送HTTP请求,是否需要进入某个目录?

I think you're trying to send request to REST API from Spring Boot application which is included in Ubuntu EC2 instance. 我认为您正在尝试从Ubuntu EC2实例中包含的Spring Boot应用程序向REST API发送请求。 You don't need to put spring boot application in a specific directory. 您不需要将spring boot应用程序放在特定目录中。 Make sure that you've installed java in EC2 instance. 确保已在EC2实例中安装了Java。 You just have to run spring boot application and open port 8080 (for embedded tomcat server) from the security group. 您只需要运行spring boot应用程序并从安全组中打开端口8080 (对于嵌入式tomcat服务器)。 Most importantly you've to check whether EC2 instance was launched in public subnet. 最重要的是,您必须检查EC2实例是否在公共子网中启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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