question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make base path configurable for WebFlux applications

See original GitHub issue

So far (Spring Boot 1.5.4-RELEASE) I were using the configuration key server.contextPath of application.properties to change the context path of a Spring Boot based web application, as follows:

server.contextPath=/mypath

Unfortunately, this has stopped working when upgrading to Spring Boot 2.0.0-M3.

Is this a bug or this feature has changed in Spring Boot 2?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:46
  • Comments:35 (17 by maintainers)

github_iconTop GitHub Comments

30reactions
philwebbcommented, Sep 4, 2019

@springmarker @huodon Please use the “👍” reaction button on the initial comment if you’re interested in the feature. Adding additional comments creates a lot of noise and makes it harder to follow the discussion.

19reactions
remesh22commented, Mar 29, 2018

server.servlet.context-path only works with below dependency:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

Since webflux is not supporting this property, i cannot provide context path for my tomcat webflux application. Because of this all my actuator endpoints are sitting at context root ‘/’. I don’t want to deploy my application as a WAR file. Is there a way to support both my endpoints and actuator endpoints at the same context root rather than the default context root of ‘/’ in webflux.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Context Path with Webflux - Stack Overflow
Using Spring Boot + WebFlux too, my workaround was to write a WebFilter with @Order(HIGHEST_PRECEDENCE) and remove the context path from any ...
Read more >
Web on Reactive Stack - Spring
However, it is easy to assemble an application from Spring configuration and WebFlux infrastructure and run it with a few lines of code....
Read more >
Getting Started with Spring WebFlux - Reflectoring
Spring introduced a Multi-Event Loop model to enable a reactive stack known as WebFlux . It is a fully non-blocking and annotation-based web ......
Read more >
ignore server.servlet.context-path for webflux projects, support ...
actually IDEA tries to make use of ``server.servlet.context-path`` configuration property on displaying spring controller mappings and ...
Read more >
Spring WebFlux - Spring Reactive Programming - DigitalOcean
Let's built a simple Spring WebFlux Hello World application. We will create a simple rest web service and use Spring Boot to run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found