spring boot2.0
小阎王
人不知而不愠,不亦君子乎!
展开
-
SpringBoot2 如何使得拦截器排除静态资源的请求
1.首先确认你的静态资源的目录结构,例如如下 2.需要在自定义的WebMvcConfigurer下面增加excludepath 要注意的是路径的配置,比如/js/**的路径,js前的/代表是绝对路径跟的是contextpath之后,所以在配置的时候一定要看清楚路径的,不然徒劳无益。 ...原创 2018-12-04 11:37:14 · 8608 阅读 · 0 评论 -
spring boot2 freemark 配置contextpath
spring boot2.0配置contextpath如下 server.servlet.context-path=/abc(此处自定义) spring.freemarker.request-context-attribute=request 在freemark中直接使用${request.contextPath}获取contextPath ...原创 2018-11-30 21:12:20 · 936 阅读 · 0 评论