简体   繁体   English

将server.context-path设置为myApp的管理基本路径设置为“ /”

[英]Set management base-path to “/” having server.context-path setted to myApp

I have a spring-boot application with vaadin8 and want to change the management base-path to "/" but also I want to keep server.context-path to /myApp . 我有一个带有vaadin8的spring-boot应用程序,想要将管理基础路径更改为“ /”,但是我也想保留server.context-path到/ myApp

If I change management base-path to "/" , all the endpoints will still start with myApp/{id} for instance: myApp/health, myApp/env and so on, and that make sense because at the end the root path of my app is /myApp . 如果将管理基本路径更改为“ /” ,则所有端点仍将以myApp / {id}开头,例如:myApp / health,myApp / env等,这很有意义,因为最后,根目录的根路径我的应用程序是/ myApp

This is how I have configured my application.yml 这就是我配置application.yml的方式

server.context-path: /myApp management.endpoint.web.base-path: /

But, how can I achieve this? 但是,我该如何实现呢? how can I have my management endpoints in this path "/" and my app context path in this one: "/myAp" 如何在此路径“ /”中拥有管理端点,并在此路径中具有我的应用上下文路径: “ / myAp”

server.servlet-path: /blah

这会将Spring调度程序servlet映射到/blah ,以便可以通过/myApp/blah/{id}访问您的API实现(如果使用了Spring MVC Rest )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM