在使用@Value注入使用该注解报错的原因,大概率是因为和lombok的引用冲突了 // 使用这个包就可以了 import org.springframework.beans.factory.annotation.Value;