diff --git a/src/main/java/cn/xuthus83/wx_post/config/OhMyEmailConfig.java b/src/main/java/cn/xuthus83/wx_post/config/OhMyEmailConfig.java index a9adf48..e99197d 100644 --- a/src/main/java/cn/xuthus83/wx_post/config/OhMyEmailConfig.java +++ b/src/main/java/cn/xuthus83/wx_post/config/OhMyEmailConfig.java @@ -17,6 +17,6 @@ public class OhMyEmailConfig { public void before() { // 配置,一次即可 - OhMyEmail.config(OhMyEmail.SMTP_QQ(false), "913651466@qq.com", "xgz187415157"); + OhMyEmail.config(OhMyEmail.SMTP_QQ(false), "913651466@qq.com", ""); } } diff --git a/src/main/java/cn/xuthus83/wx_post/config/ResourcesConfig.java b/src/main/java/cn/xuthus83/wx_post/config/ResourcesConfig.java new file mode 100644 index 0000000..df9a394 --- /dev/null +++ b/src/main/java/cn/xuthus83/wx_post/config/ResourcesConfig.java @@ -0,0 +1,20 @@ +package cn.xuthus83.wx_post.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * 通用配置 + * + * @author ruoyi + */ +@Configuration +public class ResourcesConfig implements WebMvcConfigurer { + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + /** 本地文件上传路径 */ + registry.addResourceHandler("profile/**").addResourceLocations("file:/mnts/"); + } +} \ No newline at end of file