AWS可以与Spring Boot和React一起使用吗? [英] Will AWS work with Spring Boot and React?

查看:118
本文介绍了AWS可以与Spring Boot和React一起使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在运行 mvn spring-boot:run 的地方使用Spring Boot和React进行本地开发(它在 http://localhost:8080 ),然后运行 npm start (此服务器在

I'm trying out local development with Spring Boot and React where I run mvn spring-boot:run (this runs on http://localhost:8080) for the Spring server, then I run npm start (this runs on http://localhost:3000) for the React client. My knowledge is that React is the front facing component that clients will talk to and then Spring will be what React interacts with for back-end operations.

这样的设置在AWS Elastic Beanstalk这样的AWS设置中是否会类似地工作?我很困惑,因为我所读的大部分内容都涉及将.jar或.war传递给AWS以运行Spring,但是当React是前端组件时,安装程​​序将如何工作?

Will a setup like this work similarly in a AWS setup like AWS Elastic Beanstalk? I am confused because most of what I read up involves passing the .jar or .war to AWS to run Spring but how would a setup work for when React is the front facing component?

-谢谢!

推荐答案

您可以将Spring Boot Uber Jar部署到AWS Beanstalk,然后运行npm构建来创建您的React捆绑应用程序并将其部署到AWS S3.您将需要更改一些应用程序设置以指向正确的(Beanstalk)服务器,并确保您的AWS S3设置正确.AWS文档中有一些示例.

You could deploy your Spring Boot Uber Jar to AWS Beanstalk then run an npm build to create your React bundled application and deploy that to AWS S3. You will need to change some app settings to point to the correct (Beanstalk) server and make sure your AWS S3 settings are correct. There are examples within AWS documentation.

这篇关于AWS可以与Spring Boot和React一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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