首页>代码>springboot2.0+mybaits-plus+redis+mysql+vue实现用户数据的增删改查简单实例>/springboot_mp/src/main/java/com/ht/springboot_mp/common/MyConfig.java
package com.ht.springboot_mp.common; /** * @company 宏图 * @User Kodak * @create 2019-03-22 -20:58 * 该类配置了可以访问static下所有文件夹 * 并将文件上传配置在了本地文件上 */ import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration public class MyConfig implements WebMvcConfigurer { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); registry.addResourceHandler("/upload/**").addResourceLocations("file:D:/temp-rainy/upload/"); } }

543666826 LV34
2024年12月28日
lingtiejing LV15
2023年12月18日
flygrass LV12
2023年12月5日
你爹正在加载中 LV4
2023年9月8日
龚顺龙 LV3
2023年8月7日
2017143155 LV12
2023年6月27日
czh20021029 LV1
2023年6月5日
wxy0309 LV6
2023年5月20日
bug428124 LV1
2023年3月12日
qwe123456asd LV3
2023年3月8日

LeoloSean LV1
1月3日
fucomcn LV1
2024年12月28日
543666826 LV34
2024年12月28日
ma406805131 LV19
2024年12月28日
微信网友_6955249237250048 LV5
2024年12月28日
yangchengshuai LV15
2024年10月29日
charleswang LV7
2024年10月21日
17380184110
2024年6月18日
暂无贡献等级
zeng1206 LV7
2024年6月17日
szf123 LV12
2024年5月29日