在springboot1.x的版本中,想要在請求接口時后面帶上.do
或者.html
之類的后綴,直接配置
server:
servlet-path: "*.do"
就可以,但是在springboot2.x中,這個配置是默認關閉的,需要
spring:
mvc:
pathmatch:
use-suffix-pattern: true
server:
servlet:
path: "*.html"
開啟配置后才會生效。
在springboot1.x的版本中,想要在請求接口時后面帶上.do
或者.html
之類的后綴,直接配置
server:
servlet-path: "*.do"
就可以,但是在springboot2.x中,這個配置是默認關閉的,需要
spring:
mvc:
pathmatch:
use-suffix-pattern: true
server:
servlet:
path: "*.html"
開啟配置后才會生效。