1.需要在配置文件重新执行静态文件夹位置即可

  # 指定静态文件位置
  resources:
    static-locations: classpath:/static/,classpath:/static/image/

解决spring boot 无法访问静态文件夹的附件或图片

2.心得

默认的有如下几个 ,设置后会覆盖,因此根据需要设置即可
classpath:/static
classpath:/public
classpath:/resources
classpath:/META-INF/resources

 

相关文章:

  • 2021-10-11
  • 2021-05-20
  • 2022-12-23
  • 2021-12-07
  • 2021-09-28
  • 2021-05-03
  • 2022-12-23
猜你喜欢
  • 2021-06-26
  • 2021-10-05
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案