HttpSelfHostConfiguration config = new HttpSelfHostConfiguration("http://localhost:8080") will work as expected, but if HttpSelfHostConfiguration config = new HttpSelfHostConfiguration("http://localhost:8080/root") is used then then all controllers return a 404.
Being able to append a path after the port is important because it allows you to host multiple services / applications on the same port number. Otherwise only a single application can bind to each port.
HttpSelfHostConfiguration config = new HttpSelfHostConfiguration("http://localhost:8080") will work as expected, but if HttpSelfHostConfiguration config = new HttpSelfHostConfiguration("http://localhost:8080/root") is used then then all controllers return a 404.
Being able to append a path after the port is important because it allows you to host multiple services / applications on the same port number. Otherwise only a single application can bind to each port.