开头,我们先来看下在springboot中如何整一个欢迎页。在我们之前学的web项目中,都是在xml中配置欢迎页面,但是我们在sprginboot中该如何配置呢?
我们可以顺着WebMvcAutoConfiguration看看
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读
那我们有办法自定义静态文件的位置吗?
我们可以看看源码
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读
根据上面的源码,我们可以知道,我们可以通过
Properties文件中的 prefix+属性来自定义
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读
Springboot中WebMvcAutoConfiguration源码的解读

相关文章:

  • 2021-08-02
  • 2021-11-26
  • 2022-12-23
  • 2021-11-30
  • 2021-11-30
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-07
  • 2022-01-30
  • 2021-11-16
  • 2021-04-09
  • 2021-11-09
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案