spring boot2.0配置contextpath如下
server.servlet.context-path=/abc(此处自定义)
spring.freemarker.request-context-attribute=request
在freemark中直接使用${request.contextPath}获取contextPath
本文详细介绍了如何在SpringBoot2.0中配置自定义的contextPath,通过设置server.servlet.context-path属性实现。同时,展示了如何在FreeMarker模板中通过${request.contextPath}
spring boot2.0配置contextpath如下
server.servlet.context-path=/abc(此处自定义)
spring.freemarker.request-context-attribute=request
在freemark中直接使用${request.contextPath}获取contextPath
819
330
566

被折叠的 条评论
为什么被折叠?