Example of app.yaml for a spring boot environment:

service: backend
runtime: java11
env: standard
env_variables:
    SPRING_PROFILES_ACTIVE: "gcp,backend"
handlers: 
    - url: /.*
    script: this field is required, but ignored
manual_scaling:instances: 1

For details visit:

https://cloud.google.com/appengine/docs/flexible/java/quickstart