parent
97ad14ae68
commit
208fc51e85
@ -0,0 +1,20 @@
|
||||
package com.bsmlab.dfx.agent.config;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class WebServerCustomizer implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {
|
||||
private final Settings settings;
|
||||
@Override
|
||||
public void customize(ConfigurableServletWebServerFactory factory) {
|
||||
int port = settings.getListenPort();
|
||||
factory.setPort(port);
|
||||
factory.setContextPath("/");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
package com.bsmlab.dfx.agent.config.constant;
|
||||
|
||||
public enum ActionType {
|
||||
TRIGGER,
|
||||
SCHEDULED
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.bsmlab.dfx.agent.config.constant;
|
||||
|
||||
public enum TaskType {
|
||||
DB_READ_THEN_SEND
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.bsmlab.dfx.agent.task.postman;
|
||||
|
||||
import com.bsmlab.dfx.agent.config.constant.ActionType;
|
||||
import com.bsmlab.dfx.agent.config.constant.MessageType;
|
||||
import com.bsmlab.dfx.agent.config.constant.TaskType;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class PostmanDto {
|
||||
private String postmanId;
|
||||
private TaskType taskType;
|
||||
private PostmanActionType postmanActionType;
|
||||
private PostmanMessageType postmanMessageType;
|
||||
private String recipientHostId;
|
||||
private String recipientDropBoxId;
|
||||
private List<String> routingHostIdList;
|
||||
|
||||
public class PostmanActionType {
|
||||
private ActionType actionType;
|
||||
private String command;
|
||||
private List<String> parameterKeyList = new ArrayList<>();
|
||||
private String cron;
|
||||
}
|
||||
public class PostmanMessageType {
|
||||
private MessageType messageType;
|
||||
private String dataSourceId;
|
||||
private String sqlId;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in new issue