1
사용자 지정 빌드 단계를 만들었습니다. config.jelly에 텍스트 영역을 추가했습니다. 텍스트 영역에 넣는 것은 무엇이든 저장되지만 서버를 다시 시작하거나 다시로드하면 사라집니다. 도와주세요.사용자 지정 빌드 단계 구성이 지속되지 않습니다. 다시로드하거나 서버를 다시 시작하면 사라집니다.
사용자 지정 빌드 단계를 만들었습니다. config.jelly에 텍스트 영역을 추가했습니다. 텍스트 영역에 넣는 것은 무엇이든 저장되지만 서버를 다시 시작하거나 다시로드하면 사라집니다. 도와주세요.사용자 지정 빌드 단계 구성이 지속되지 않습니다. 다시로드하거나 서버를 다시 시작하면 사라집니다.
설명자의 configure() 메서드를 재정 의하여 문제를 해결할 수 있습니다. 코드는 ...
@Extension
public static final class DescriptorImpl extends BuildStepDescriptor<Builder>{
private String text;
public DescriptorImpl(){
load();
}
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws hudson.model.Descriptor.FormException {
// TODO Auto-generated method stub
text = json.getString("text");
req.bindJSON(this, json);
save();
return super.configure(req, json);
//return true;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}