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:\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~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章