Halo踩坑记录(一)

这篇博客记录了在使用Halo博客系统时遇到的三个主要问题及其解决方案:首先,由于gradle版本不兼容导致的类加载错误,通过更新gradle版本至5.6.4解决;其次,遇到Spring Boot的bean缺失问题,通过特定步骤成功启动项目;最后,项目启动后因主题缺失报错,下载并安装anatole主题至指定文件夹后问题解决。作者建议遇到类似问题的读者查阅Halo的官方开发者文档寻求帮助。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目第一次运行时报错(gradle版本问题)

Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention’.

这个类无法加载或者找不到应该是gradle版本问题。halo用的是Gradle6.3,我的idea版本是2018.3.1.可能是我的idea并不支持这个版本的gradle,一开始将gradle版本更换为4.10.2,并没有解决问题,后面根据网友的说法换成了5.6.4.成功将这问题解决。

项目第二次报错

Field buildProperties in run.halo.app.config.HaloConfiguration required a bean of type ‘org.springframework.boot.info.BuildProperties’ that could not be found.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-03-30 21:30:52.522 ERROR 222768 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field buildProperties in run.halo.app.config.HaloConfiguration required a bean of type 'org.springframework.boot.info.BuildProperties' that could not be found.

The following candidates were found but could not be injected:
	- Bean method 'buildProperties' in 'ProjectInfoAutoConfiguration' not loaded because @ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}'


Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.boot.info.BuildProperties' in your configuration.


Process finished with exit code 0

解决了gradle版本问题后,又出现了好像是springboot的问题。解决的具体原理是什么暂不清楚,参考的网友的博客解决的(https://blog.youkuaiyun.com/happywinterchen/article/details/105209088)这里放上解决步骤。

在这里插入图片描述

在右边找到1号位置的bootBuildInfo,双击后会出现左边的build.info.properties,之后再双击运行右边的bootRun,项目就可以启动了。

项目第三次报错(主题缺失)

ThemePropertyMissingException C:\Users\Administrator.halo\templates\themes\anatole:没有说明文件

项目启动后127.0.0.1:8090/admin打不开,看控制台报错了。

问题出来主题缺失,根据报错提示的路径找到文件夹,确实是空的,到halo官网主题下载的anatole主题,放到对应的文件夹内后,我的halo终于启动成功了。

=========================================================
2020年04月30日 09:22:56

今天才发现halo的官方开发者文档 https://halo.run/archives/develop-application-structure.html
大部分问题可以到官方开发者文档中找到答案,问题还未得到解决的小伙伴可以去那里看看。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值