halo项目源码本地部署解决方案

@

前言

先列举会出错的点:
1、Plugin [id: 'org.springframework.boot', version: '2.2.5.RELEASE'] was not found in any of the follow

2、Bean method 'buildProperties' in 'ProjectInfoAutoConfiguration' not loaded @ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}'

3、not found C:UsersLenovo.halo emplates hemesanatole 说明文件

OK,开始部署


1、拉取halo项目

执行:

git clone https://github.com/halo-dev/halo.git

在这里插入图片描述
安装成功后再说。
ps:在使用idea打开之前,根据其他博客
安装好gradle


2、使用idea打开halo

在打开的时候会有需要配置的gradle,根据以下情况自行选择

在这里插入图片描述


3、构建的时候出现的错误

(1)springboot 2.2.5插件找不到 (编译时)
Plugin [id: 'org.springframework.boot', version: '2.2.5.RELEASE'] was not found in any of the follow

问题原因: 就是项目内没有这个插件,所以我们得build,让它去下载这个插件
问题解决: 1、gradle build 2、刷新一下gradle
gradle build在该项目的文件目录下进行。。。

在这里插入图片描述
(2)找不到build-info.properties文件 (运行时)
Bean method 'buildProperties' in 'ProjectInfoAutoConfiguration' not loaded @ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}'

问题原因: 是因为我们运行时的构建器是默认Idea
问题解决: 把运行时构建器改为gradle即可
在这里插入图片描述
然后
在这里插入图片描述
(3)找不到说明文件 (运行时)

not found C:UsersLenovo.halo emplates hemesanatole 说明文件

问题原因: 不知道是因为啥,应该是模板没有初始化的原因吧。
问题解决: 把自己运行过的anatole文件直接cope过去即可

在这里插入图片描述

没有anatoe文件的可以用我提供的:
链接:https://pan.baidu.com/s/1X7uC15Y_nNwNQ3i3G7a1Jg
提取码:8yv8

4、结果

在这里插入图片描述
在这里插入图片描述

后言

至此就全部解决问题了,如果还有问题可以下方评论区提问,我会第一时间回答。

bye~

原文地址:https://www.cnblogs.com/liwangwang/p/12802576.html