Provide a way to set the root context path
See original GitHub issueIf a user wants to add a context path for all endpoints, he/she has to add the prefix string to all service setters which is tedious. If we provide a way to set the context path, it will be much easier:
Server.builder()
.contextPath("/api")
.service("/foo", myService) // myService binds to "/api/foo"
...
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Spring Boot Change Context Path - Baeldung
The most straightforward way of changing the context path is to set the property in the application.properties/yml file:
Read more >Setting the Context Root (The Java EE 5 Tutorial)
Setting the Context Root. A context root identifies a web application in a Java EE server. You specify the context root when you...
Read more >Chapter 6. Setting the context root of a web application
For web applications that are deployed outside an EAR file, the context root can be specified in two ways. First, the context root...
Read more >How to change context root of a dynamic web project in Eclipse?
14 Answers 14 · In your project's Properties, choose Web Project Settings. · Change Context root to app. · Choose Window > Show...
Read more >Spring Boot context path - ZetCode
The context path can be changed in many ways. We can set it in the properties file, with the SERVER_SERVLET_CONTEXT_PATH environment variable, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sure… i’lll try work on this over the next week.
Would it make sense to allow building ‘sub routers’? It may end up just being some syntactical sugar but it would be great to have something like:
etc.