1
votes

I'm new to spring boot and aws. I built a simple application with 2 endpoints that works fine when I run it locally on my mac.

I followed the instructions from Spring while deploying my application. I setup an environment, generated a war file, and uploaded it. Before generating my war file, I changed the packing to "war" in my pom.xml file and changed the scope of spring-boot-starter-tomcat. My beanstalk environment is running tomcat 8 and java 8 so under my project properties in my pom.xml file, I also set the Java version to 1.8 and tomcat version to 8.0.23.

My war file uploads without an issue and my environment health is ok, but when I try to test one of the endpoints I keep getting a 404 error. I'm really struggling with this and any help is appreciated.

1
If you received 404 errors while running your site anywhere else, would you not look at the Tomcat server logs to see if there was an error deploying your application? Why would you not do the same thing when running it on Elastic Beanstalk? docs.aws.amazon.com/elasticbeanstalk/latest/dg/… The details of your issue are sitting out there in your log files, which only you have access to. No one here can help you until you research your issue properly. - Mark B
I've skimmed through the logs but couldn't identify the issue. Which log file in particular should I be checking? - user3567080

1 Answers

1
votes

I've solved the issue. There was a bug with the way in which IntelliJ was generating my war file. Instead, I needed to open terminal and enter:

mvn package

To test it:
java -jar target/(my file name).war