Spring: Springboot 静态资源

spring:
  mvc:
    view:
      prefix: /servlet/static/  # 不加context-path
      suffix: .html
    static-path-pattern: /static/**
    servlet:
      path: /servlet
      load-on-startup: 1
  web:
    resources:
      static-locations: classpath:/META-INF/resources, classpath:/resources, classpath:/static, classpath:/public, classpath:/, file:${property.file.upload}, file:rt
      add-mappings: true

server:
  port: 9090
  servlet:
    context-path: /ctx

property:
  file:
    upload: /c:/

 

 

 

 

 

 

 

posted @ 2022-04-20 00:41  ascertain  阅读(22)  评论(0编辑  收藏  举报