I am using Google App Engine flexible to deploy my spring boot app. I see the configuration can be specified by app.yaml or appengine-web.xml. However, my questions are,
Thanks in advance.
The app. yaml file defines your configuration settings for your runtime as well as general app, network, and other resource settings. Do not add app.
web. xml defines mappings between URL paths and the servlets that handle requests with those paths. The web server uses this configuration to identify the servlet to handle a given request and call the class method that corresponds to the request method. For example: the doGet() method for HTTP GET requests.
Spring MVC web applications use the web. xml file as a deployment descriptor file. Also, it defines mappings between URL paths and the servlets in the web.
You need to use both files.
The app.yaml
file covers configurations applicable to all flexible environment apps/services, regardless of the language they're written in, like:
flex
environment and other General settings
The web.xml
config file has a very specific coverage, which doesn't overlap the app.yaml
file's coverage:
The
web.xml
file is only used when deploying a Java app to a runtime that includes the Jetty9/servlet3 server. For more details, see the Java 8 / Jetty 9.3 Runtime.
As for your #2 question, you may have been looking at the standard env docs (check the docs/standard
or docs/flexible
strings in the doc's URL). From web.xml
:
This file is named
web.xml
, and resides in the app's WAR under theWEB-INF/
directory.web.xml
is part of the servlet standard for web applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With