App engine flexible ignore context path in Spring boot application

339 views
Skip to first unread message

Ky Nguyen

unread,
Oct 12, 2018, 7:50:11 AM10/12/18
to Google App Engine
Hi everyone.

I have a spring boot application deploy on GAE flex env.
But I facing issue that my application context not load after deploy on GAE flex.
In my app, I already set context path in application.properties look like :
server.context-path=/myapp

and it work fine on my local tomcat and jetty embedded server, I just access following address myhost:8080/myapp
But when run on GAE flex the context path is ignored, so I just access with GAE domain with context '/'.

Because I'm using dispatch to config routing micro service on GAE, so I need to define specify context path for each service.

Can anybody help me in this case?
Thanks so much.

Katayoon (Cloud Platform Support)

unread,
Oct 15, 2018, 12:56:44 PM10/15/18
to Google App Engine

Hi,


As mentioned in Spring Boot 2.0.0 M1 Release Notes, “server.context-path” is changed to the new property “server.servlet.context-path”. You may use a dispatch.yaml which allows you to override routing rules so that you will be able to send incoming requests to a specific service based on the path or host name in the request URL.

Reply all
Reply to author
Forward
0 new messages