在下列哪个选项中,不是用于放置SpringBoot框架中的静态资源?

A. '/static/' B. '/public/' C. '/resources/' D. '/templates/'

答案:D. '/templates/'

解释:

SpringBoot 框架默认会将以下路径下的文件作为静态资源处理:

  • '/static/'
  • '/public/'
  • '/resources/'

而 '/templates/' 路径通常用来存放 Thymeleaf 模板文件,而不是静态资源。

SpringBoot 静态资源存放路径:排除选项

原文地址: https://www.cveoy.top/t/topic/oubK 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录