当前位置:网站首页>5.4 static resource mapping

5.4 static resource mapping

2020-11-06 01:21:00 Memory

All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm

5.4 Static resource mapping

Let's talk about static resource configuration , Let's talk about the direct configuration in the code . And then we will explain it in XML How to configure the mapping of static resources in the configuration file .

5.4.1 Programming static resource mapping

First we need to use MvcConfig Realization WebMvcConfigurer Interface , stay Spring5.0 In the past, we can inherit WebMvcConfigurerAdapter Class , It is now abandoned .

And then in MvcConfig Add class in method , Such as code list 5-24 Shown

版权声明
本文为[Memory]所创,转载请带上原文链接,感谢