mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-01 15:26:37 +00:00
上传后台管理系统代码
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
package com.java2nb.common.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
@Component
|
||||
class WebConfigurer extends WebMvcConfigurerAdapter {
|
||||
@Autowired
|
||||
JnConfig jnConfig;
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/files/**").addResourceLocations("file:///"+ jnConfig.getUploadPath());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user