change resource path
|
@ -98,7 +98,7 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
|
||||||
registry.addResourceHandler("/upload/**")
|
registry.addResourceHandler("/upload/**")
|
||||||
.addResourceLocations("file:///" + System.getProperties().getProperty("user.home") + "/halo/upload/");
|
.addResourceLocations("file:///" + System.getProperties().getProperty("user.home") + "/halo/upload/");
|
||||||
registry.addResourceHandler("/favicon.ico")
|
registry.addResourceHandler("/favicon.ico")
|
||||||
.addResourceLocations("classpath:/static/halo-backend/images/favicon.ico");
|
.addResourceLocations("classpath:/static/halo-admin/images/favicon.ico");
|
||||||
registry.addResourceHandler("/backup/**")
|
registry.addResourceHandler("/backup/**")
|
||||||
.addResourceLocations("file:///" + System.getProperties().getProperty("user.home") + "/halo/backup/");
|
.addResourceLocations("file:///" + System.getProperties().getProperty("user.home") + "/halo/backup/");
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ public enum BlogPropertiesEnum {
|
||||||
/**
|
/**
|
||||||
* 默认缩略图地址
|
* 默认缩略图地址
|
||||||
*/
|
*/
|
||||||
DEFAULT_THUMBNAIL("/static/halo-frontend/images/thumbnail/thumbnail.png"),
|
DEFAULT_THUMBNAIL("/static/halo-content/images/thumbnail/thumbnail.png"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自动备份
|
* 自动备份
|
||||||
|
|
|
@ -260,7 +260,7 @@ public class PageController {
|
||||||
post.setPostContent(MarkdownUtils.renderMarkdown(post.getPostContentMd()));
|
post.setPostContent(MarkdownUtils.renderMarkdown(post.getPostContentMd()));
|
||||||
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
|
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
|
||||||
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
|
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
|
||||||
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-content/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
||||||
}
|
}
|
||||||
postService.create(post);
|
postService.create(post);
|
||||||
logsService.save(LogsRecord.PUSH_PAGE, post.getPostTitle(), request);
|
logsService.save(LogsRecord.PUSH_PAGE, post.getPostTitle(), request);
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class PostController extends BaseController {
|
||||||
}
|
}
|
||||||
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
|
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
|
||||||
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
|
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
|
||||||
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-content/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
||||||
}
|
}
|
||||||
postService.create(post);
|
postService.create(post);
|
||||||
logsService.save(LogsRecord.PUSH_POST, post.getPostTitle(), request);
|
logsService.save(LogsRecord.PUSH_POST, post.getPostTitle(), request);
|
||||||
|
@ -200,7 +200,7 @@ public class PostController extends BaseController {
|
||||||
}
|
}
|
||||||
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
|
//当没有选择文章缩略图的时候,自动分配一张内置的缩略图
|
||||||
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
|
if (StrUtil.equals(post.getPostThumbnail(), BlogPropertiesEnum.DEFAULT_THUMBNAIL.getProp())) {
|
||||||
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
post.setPostThumbnail(OPTIONS.get(BlogPropertiesEnum.BLOG_URL.getProp()) + "/static/halo-content/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
||||||
}
|
}
|
||||||
post = postService.create(post);
|
post = postService.create(post);
|
||||||
if (null != post) {
|
if (null != post) {
|
||||||
|
|
|
@ -142,7 +142,7 @@ public class InstallController {
|
||||||
post.setUser(user);
|
post.setUser(user);
|
||||||
post.setCategories(categories);
|
post.setCategories(categories);
|
||||||
post.setAllowComment(AllowCommentEnum.ALLOW.getCode());
|
post.setAllowComment(AllowCommentEnum.ALLOW.getCode());
|
||||||
post.setPostThumbnail("/static/halo-frontend/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
post.setPostThumbnail("/static/halo-content/images/thumbnail/thumbnail-" + RandomUtil.randomInt(1, 11) + ".jpg");
|
||||||
postService.create(post);
|
postService.create(post);
|
||||||
|
|
||||||
//第一个评论
|
//第一个评论
|
||||||
|
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 701 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |