Spring boot 学习使用中的各种问题
目录
集成mvc中的问题
- 配置freemark
- 配置suffix
- 增加静态资源位置
@Configuration
public class CustomWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
//自定义增加静态资源location
registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
}
}
最终这块反映的问题还是基础不熟悉,挺浪费时间的,所以最终总是要多花些时间去了解本质和原理。