其他分享
首页 > 其他分享> > Spring: Springboot 静态资源

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:/

 

 

 

 

 

 

 

标签:Springboot,静态,Spring,classpath,static,file,path,servlet,resources
来源: https://www.cnblogs.com/dissipate/p/16168149.html