如何实现halo项目源码在本地高效部署?

摘要:@ "toc" 前言 先列举会出错的点: 1、Plugin [id: 'org.springframework.boot', version
@ 目录前言1、拉取halo项目2、使用idea打开halo3、构建的时候出现的错误4、结果后言 前言 先列举会出错的点: 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:\Users\Lenovo.halo\templates\themes\anatole 说明文件 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:\Users\Lenovo.halo\templates\themes\anatole 说明文件 问题原因: 不知道是因为啥,应该是模板没有初始化的原因吧。 问题解决: 把自己运行过的anatole文件直接cope过去即可 没有anatoe文件的可以用我提供的: 链接:https://pan.baidu.com/s/1X7uC15Y_nNwNQ3i3G7a1Jg 提取码:8yv8 4、结果 后言 至此就全部解决问题了,如果还有问题可以下方评论区提问,我会第一时间回答。 bye~