它们都有一个onConstructor属性,允许您指定应该标记生成的构造函数的注释。@NoArgsConstructor(onConstructor=@__({@AnnotationsGoHere}))@NoArgsConstructor(onConstructor_={@AnnotationsGohere}) // note the underscore after onConstruc
这就是代码。我用的是黄瓜和guice。我想使用Lombok。我使用的是java 8public class VolumeCreateTestSteps {private final VolumeCreateTabs volumeCreateTabs;public VolumeCreateTestSteps(Volu
我想通过构造函数将类A注入到类B中。 ? @Component} import lombok.RequiredArgsConstructor;import org.springframework.boot.test.context.SpringBootTest;
@RequiredArgsConstructor private final A a;
public void
但是,有几个类使用: @RequiredArgsConstructor(onConstructor_ = {@Inject}) Eclipse抱怨onConstructor_部分说: The attributeonConstructor_ is undefined for the annotation type
RequiredArgsConstructor.编辑: 如果我将注释中的注入更改为 onConstructor = @__(@Inject) 它似乎起作用了.. 但是,我不想这样做