The backend can be deployed but API call is not working.
The frontend project and backend project are separated, I am trying to deploy the backend(Spring Boot) project onto AWS Beanstalk using sub-generator and everything looks fine:
I have configured the server port to 5000 Deploying a Spring Boot Application on AWS Using AWS Elastic Beanstalk
When I invoke API with Beanstalk Environment URL, it always give me 404 Not Found error.
Does anyone know how to solve this issue?
Related
I created spring boot api with gradle build. everything working fine in my local.
I deployed angular app in Sites/DefaultsTest in IIS web server. it run in https://example.app.com/app
SpringBoot API base path is '/api'
I want to deploy spring boot api in same windows server machine and should able to access through Angular App globally.
please guide me.
IIS WebServer Dashboard
As far as I know, the spring boot API is a java web application, we don't suggest you directly hosted the java web application in the IIS.
I suggest you could try to install a docker or using tomcat to host the application, then you could use IIS reverse proxy to redirect the request to that API to get the result.
More details about how host the spring boot application on the docker, you could refer to below article.
https://blog.codecentric.de/en/2017/04/ansible-docker-windows-containers-spring-boot/
More details about how to use IIS reverse proxy, you could refer to below article.
https://blogs.msdn.microsoft.com/friis/2016/08/25/setup-iis-with-url-rewrite-as-a-reverse-proxy-for-real-world-apps/
My colleague and me developed simple spring boot application and deployed (war file) in AWS Beanstalk. It is not worked properly.My first
page(loginpage.jsp-Get mapping) loaded perfectly in AWS. After submitting credentials my second page(Mainpage.jsp - Post mapping)
does not loaded. It shows internal server error=500 only. But we deployed on Tomcat server(local) all pages (Request and Response) loaded perfectly.
we did not added any cloud dependency in Pom.xml. Please help us...
This is our
Error message.
This is our
Pom.xml.
I have created Spring Boot Rest Sample service with one endpoint.
It is running fine on local.
http://localhost:8080/test
I deployed the same on EBS as well with the EBS endpoint.
demomitesh.us-east-2.elasticbeanstalk.com
when i am trying to access the endpoint with the URL
demomitesh.us-east-2.elasticbeanstalk.com/test,
I get 404 Below Error.
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.
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?
-Thanks!
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.
I am deploying Spring Boot Application in Amazon BeanStalk.
Created a new RDS Postgres instance and connected to that instance using Postgres Client Application. Then created a new database in that. Then Changed database configuration to that instance in my local system Spring boot application. Then I able to connect to that database and use it through the application. But when deployed as a war file in Amazon Beanstalk. It is not working. Showing error as
Unable to obtain JDBC Connection
Any Solution?
Thanks in Adavance