idea中的springboot+gradle项目报错springboot configuration annotation processor not found in classpath

idea中的springboot项目,打开某个类run.halo.app.config.properties.HaloProperties.java,报错(使用gradle编译):

springboot configuration annotation processor not found in classpath

网上的解决方案是pom.xml文件里面添加如下配置.

<!-- 自定义的元数据依赖->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>

但是,这个时maven项目的解决方案,我的时gradle项目。

另外一个问题:我的很多java类中报错:找不到方法,

我观察了下,都是getter和setter方法。

原因:我没有安装lombok插件,在idea中安装lombok插件,即可解决。

猜你喜欢

转载自www.cnblogs.com/mediocreWorld/p/11846332.html