parent
a976415504
commit
ab0281eae8
@ -0,0 +1,32 @@
|
|||||||
|
package kr.re.etri.autoflow.common;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
|
||||||
|
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
|
||||||
|
import software.amazon.awssdk.regions.Region;
|
||||||
|
import software.amazon.awssdk.services.s3.S3Client;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class AwsConfig {
|
||||||
|
|
||||||
|
@Value("${cloud.aws.credentials.access-key}")
|
||||||
|
private String accessKey;
|
||||||
|
|
||||||
|
@Value("${cloud.aws.credentials.secret-key}")
|
||||||
|
private String secretKey;
|
||||||
|
|
||||||
|
@Value("${cloud.aws.region.static}")
|
||||||
|
private String region;
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public S3Client s3Client() {
|
||||||
|
AwsBasicCredentials credentials = AwsBasicCredentials.create(accessKey, secretKey);
|
||||||
|
|
||||||
|
return S3Client.builder()
|
||||||
|
.region(Region.of(region))
|
||||||
|
.credentialsProvider(StaticCredentialsProvider.create(credentials))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,19 +1,72 @@
|
|||||||
package kr.re.etri.autoflow.payload.request;
|
package kr.re.etri.autoflow.payload.request;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Getter
|
||||||
public class EdgeSWVO {
|
@Setter
|
||||||
|
public class EdgeSWVO implements Serializable {
|
||||||
|
|
||||||
|
private int sw_serial = -1;
|
||||||
|
private int ed_pkg_serial = -1;
|
||||||
|
private int sw_group = -1;
|
||||||
|
private String sw_group_name;
|
||||||
|
private int sw_type = -1;
|
||||||
|
private String sw_type_name;
|
||||||
|
private String sw_manufacturer;
|
||||||
|
private String package_id;
|
||||||
private String sw_id;
|
private String sw_id;
|
||||||
private String sw_name;
|
|
||||||
private String sw_version;
|
private String sw_version;
|
||||||
|
private String sw_name;
|
||||||
|
private String file_type;
|
||||||
|
private String file_name;
|
||||||
private String creation_datetime;
|
private String creation_datetime;
|
||||||
|
private long file_size = -1;
|
||||||
|
private String file_location;
|
||||||
|
private int install_os = -1;
|
||||||
|
private String install_os_name;
|
||||||
|
|
||||||
|
private List<MultipartFile> files = new ArrayList<>();
|
||||||
|
|
||||||
|
private boolean newest_version = false;
|
||||||
|
private String sw_serial_list;
|
||||||
|
private int archive_type = -1;
|
||||||
|
private boolean hmac = false;
|
||||||
|
private String user_id;
|
||||||
|
private String window_root_location;
|
||||||
|
private String window_exe_name;
|
||||||
|
private String linux_root_location;
|
||||||
|
private String linux_exe_name;
|
||||||
|
private String edge_id;
|
||||||
|
private String location_number;
|
||||||
|
|
||||||
|
private String exec_yn;
|
||||||
|
private String download_location;
|
||||||
private String auth_id;
|
private String auth_id;
|
||||||
|
|
||||||
// 파일 업로드용
|
private String secret_at;
|
||||||
private MultipartFile file;
|
private boolean admin_at;
|
||||||
|
|
||||||
|
private String user_input_install_location;
|
||||||
|
|
||||||
|
// 파일 리스트 getter/setter (복사본 반환)
|
||||||
|
public List<MultipartFile> getFiles() {
|
||||||
|
if (this.files != null) {
|
||||||
|
return new ArrayList<>(this.files);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFiles(List<MultipartFile> files) {
|
||||||
|
if (files != null) {
|
||||||
|
this.files = new ArrayList<>(files);
|
||||||
|
} else {
|
||||||
|
this.files = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue