天天看点

spring boot2 freemark 配置contextpath

spring boot2.0配置contextpath如下

server.servlet.context-path=/abc(此处自定义)

spring.freemarker.request-context-attribute=request

在freemark中直接使用${request.contextPath}获取contextPath

继续阅读