idea 导入halo报错

错误1

idea Unable to load class 'org.gradle.api.internal.plugins.DefaultConvention'

这个错误是idea中的某个插件和gradle的版本不兼容,如果不改配置文件需要更新idea,我是用的idea2018,如果改配置文件该下面两个配置文件,其实就是更改gradle的版本为4.10.
在这里插入图片描述
在这里插入图片描述

错误2

run.halo.app.exception.ThemePropertyMissingException: C:\Users\12783\.halo\templates\themes\anatole 没有说明文件

这个是因为我把.halo目录删除了,再次启动报的错误,发现主题目录是空的。。。然后去下载了一个主题放里面
在这里插入图片描述

错误3

2020-03-30 21:30:52.399  WARN 222768 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'adminAuthenticationFilter' defined in file [D:\workspace\halo\out\production\classes\run\halo\app\security\filter\AdminAuthenticationFilter.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'haloConfiguration': Unsatisfied dependency expressed through field 'buildProperties'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.info.BuildProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2020-03-30 21:30:52.408  INFO 222768 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

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

这个问题不知道为啥…,最后找到的解决方案是:
第一步:bulid这个地方一下


会生成一个这个东西

在这里插入图片描述
然后直接启动这个地方(下图红框)

在这里插入图片描述
就没有报错了,项目正常启动。

欢迎关注公众号:理木客
在这里插入图片描述

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