Spring: Springboot 静态资源

2022/4/20 6:44:44

本文主要是介绍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:/

 

 

 

 

 

 

 



这篇关于Spring: Springboot 静态资源的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程