weixin_43078650 2019-12-16 15:13 采纳率: 0%
浏览 1297
已采纳

Spring boot 访问静态资源,js/css/图片报500是怎么回事啊

页面报HTTP Status 500 – Internal Server Error

properties:

spring.resources.static-locations=classpath:/static/

css和js都放在static文件夹下面,html放在templates下面

  • 写回答

1条回答 默认 最新

  • Amo_lt 2019-12-16 15:30
    关注

    https://blog.csdn.net/zxc1310284454/article/details/81127889

    印象中好像看到过,spring boot2.x版本配置spring.resources.static-locations无效。你可以找下你的拦截器,然后再拦截器里取消拦截static中的文件。500报错可以截全一点吗?猜测是拦截器拦到了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?