yunqing
@Configuration
public class WebMvcConfiguration extends WebMvcConfigurationSupport {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
    }
}

templates中的html页面这样引用

<link rel="stylesheet" type="text/css" href="static/css/reset.css"/>
<link rel="stylesheet" type="text/css" href="static/css/reset.css"/>

static 下web中的html这样引用
<script src="../js/jquery-3.3.1.min.js"></script>


好文推荐:https://blog.csdn.net/gebitan505/article/details/70142025

分类:

技术点:

相关文章:

  • 2021-12-24
  • 2021-12-02
  • 2021-12-23
  • 2021-11-20
  • 2021-11-20
猜你喜欢
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-15
  • 2021-08-01
相关资源
相似解决方案