🐛 草稿详情问题修复
This commit is contained in:
parent
26d8674f34
commit
0d50debe6a
@ -23,6 +23,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Spring MVC 配置
|
||||
*
|
||||
* @author ronger
|
||||
*/
|
||||
@Configuration
|
||||
@ -49,7 +50,7 @@ public class WebMvcConfigurer extends WebMvcConfigurationSupport {
|
||||
|
||||
/**
|
||||
* 解决跨域问题
|
||||
* */
|
||||
*/
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
@ -65,17 +66,18 @@ public class WebMvcConfigurer extends WebMvcConfigurationSupport {
|
||||
|
||||
/**
|
||||
* 添加拦截器
|
||||
* */
|
||||
*/
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(restAuthTokenInterceptor()).addPathPatterns("/api/**")
|
||||
.excludePathPatterns("/api/v1/console/**","/api/v1/article/articles/**","/api/v1/article/detail/**","/api/v1/topic/**","/api/v1/user/**");
|
||||
.excludePathPatterns("/api/v1/console/**", "/api/v1/article/articles/**", "/api/v1/article/detail/**"
|
||||
, "/api/v1/topic/**", "/api/v1/user/**", "/api/v1/article/*/comments");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 访问静态资源
|
||||
* */
|
||||
*/
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
/**
|
||||
@ -89,7 +91,7 @@ public class WebMvcConfigurer extends WebMvcConfigurationSupport {
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
//将所有/static/** 访问都映射到classpath:/static/ 目录下
|
||||
registry.addResourceHandler("/static/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX +"/static/");
|
||||
registry.addResourceHandler("/static/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX + "/static/");
|
||||
super.addResourceHandlers(registry);
|
||||
}
|
||||
}
|
||||
|
@ -303,6 +303,8 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
|
||||
article.setPortfolios(portfolioArticleDTOList);
|
||||
} else if (type.equals(ARTICLE_EDIT)) {
|
||||
article.setArticleContent(articleContent.getArticleContent());
|
||||
} else {
|
||||
article.setArticleContent(articleContent.getArticleContentHtml());
|
||||
}
|
||||
}
|
||||
return article;
|
||||
|
@ -33,7 +33,7 @@ public class UploadController {
|
||||
|
||||
private final static String UPLOAD_SIMPLE_URL = "/api/upload/file";
|
||||
private final static String UPLOAD_URL = "/api/upload/file/batch";
|
||||
public static final String ctxHeadPicPath = "/usr/local/src/tomcat-hp/webapps/vertical";
|
||||
public static final String ctxHeadPicPath = "/usr/local/src/nebula/static";
|
||||
|
||||
@PostMapping("/file")
|
||||
public GlobalResult uploadPicture(@RequestParam(value = "file", required = false) MultipartFile multipartFile,@RequestParam(defaultValue = "1")Integer type, HttpServletRequest request){
|
||||
|
Loading…
x
Reference in New Issue
Block a user