Skip to content
Advertisement

Google Cloud Appengine returns ‘404 Error’ when calling Spring Boot REST APIs

I have deployed a spring boot application to Google cloud appengine service. When I run the application locally using mvn appengine:run everything works fine and I’m able to send requests to REST APIs and get expected responses back. In fact when I deploy the application to appengine I can see the application logs which indicate that server is up and there aren’t any exceptions or warnings during server initialization; But when I try to call any kind of endpoints, google send a HTML page containing below text:
Error: Not Found

I’m using:
JDK 1.8
Spring Boot 2.4.5
Maven
Cloud SDK version 395.0.0

Advertisement

Answer

As suspected, this is a problem with the Cloud SDK v395.0.0. You can deploy your application using an older version by setting the cloudSdkVersion configuration parameter of the appengine maven plugin in your pom.xml file. More information can be found in the AppEngine Maven Plugin reference document.

I tested this by deploying the Spring Boot helloWorld world sample app with various versions of the SDK and it broke once deployed with v395+

This issue has been reported on Google’s Issue Tracker

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement