springboot配置信息

springboot 1.5.x

server.context-path=/center // 应用上下文,在所有的controller之前
server.servlet-path=*.html  // 拼接在controller后面,eg:http://localhost:8080/center/index.html

springboot 2.0.x

server.servlet.context-path=/fxm  // 应用上下文,在所有的controller之前
spring.mvc.pathmatch.use-suffix-pattern=true // 默认为false,只有为true的时候,server.servlet.path才生效
server.servlet.path=*.html  // 拼接在controller后面,eg:http://localhost:8084/fxm/index.html

在上述列表中,注意springboot的版本,还有server.servlet.path和server.servlet-path后面暂时(我试过的情况)只能等于 *.html,否则报错,要么就是访问不到,后续更进

posted @ 2020-05-28 16:51  林就远  阅读(217)  评论(0编辑  收藏  举报