import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.1.6"
id("io.spring.dependency-management") version "1.1.4"
kotlin("jvm") version "1.8.22"
kotlin("plugin.spring") version "1.8.22"
kotlin("plugin.noarg") version "1.8.22"
kotlin("plugin.allopen") version "1.8.22"
kotlin("kapt") version "1.8.22"
}
group = "com.teamsparta"
version = "0.0.1-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_17
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
val queryDslVersion = "5.0.0"
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("io.jsonwebtoken:jjwt-api:0.12.3")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("com.querydsl:querydsl-jpa:5.0.0:jakarta") // 추가!
kapt("com.querydsl:querydsl-apt:5.0.0:jakarta") // 추가!
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.3")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.3")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
implementation("com.github.doyaaaaaken:kotlin-csv-jvm:0.15.0")
}
allOpen {
annotation("jakarta.persistence.Entity")
annotation("jakarta.persistence.MappedSuperclass")
annotation("jakarta.persistence.Embeddable")
}
noArg {
annotation("jakarta.persistence.Entity")
annotation("jakarta.persistence.MappedSuperclass")
annotation("jakarta.persistence.Embeddable")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "17"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.bootBuildImage {
builder.set("paketobuildpacks/builder-jammy-base:latest")
}
지금 이 상태에서
java.lang.IllegalAccessError: superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x67d1402e) cannot access class cohttp://m.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export cohttp://m.sun.tools.javac.main to unnamed module @0x67d1402e
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at org.jetbrains.kotlin.kapt3.base.KaptContext.<init>(KaptContext.kt:55)
at org.jetbrains.kotlin.kapt3.KaptContextForStubGeneration.<init>(KaptContextForStubGeneration.kt:38)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.contextForStubGeneration(Kapt3Extension.kt:295)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:174)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:104)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:115)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:125)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:99)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:257)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:42)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:248)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:88)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:47)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:168)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:53)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:100)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:46)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:495)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:133)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:486)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:409)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:290)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:112)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:627)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:101)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1587)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:598)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:844)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:721)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:720)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Errors were stored into C:\Users\asdf\Desktop\��뷮 ������Ʈ\hoop\.gradle\kotlin\errors\errors-1708564267309.log
이런 이상한 에러가 떠서 그냥쿼리 관련 기능은 날려버렸다.
튜터님께 상담한 결과도 쿼리는 관계없다고 하셨다.
시간을 며칠이나 이걸로 날렸지???
그대신 직접 스웨거에 업로드를 하기로했다. 그리고 거기 업로드된 녀석을 db가 받는다는 계획이다.
먼저 파일을 업러드하려면 서비스에
fun save(file: MultipartFile)
서비스임플에
override fun save(file: MultipartFile) {
val path = Paths.get("/path/to/save/" + file.originalFilename)
file.transferTo(path)
}
컨트롤러에
@PostMapping("/upload", consumes = ["multipart/form-data"])
fun uploadFile(@RequestParam("file") file: MultipartFile) {
if (file.isEmpty) {
// 파일이 비어있는지 확인
println("File is empty")
return
}
// MultipartFile을 BufferedReader로 변환
val reader = BufferedReader(InputStreamReader(file.inputStream))
// CSV 파일의 각 라인을 읽어 처리
var line: String?
while (reader.readLine().also { line = it } != null) {
// 각 라인에 대한 처리 수행
println(line)
}
// 작업이 끝나면 리더를 닫습니다.
reader.close()
}
하지만 이걸로는 부족하니 더 해보라고 했다.
즉, 나머지는 우리가 채워야 한다.
확인결과, 우선 파일을 업로드하는 기능이 여기엔 없었다.
@PostMapping("/upload", consumes = ["multipart/form-data"])
fun uploadFile(@RequestParam("file") file: MultipartFile) {
if (file.isEmpty) {
// 파일이 비어있는지 확인
println("File is empty")
return
}
// MultipartFile을 BufferedReader로 변환
val reader = BufferedReader(InputStreamReader(file.inputStream))
// CSV 파일의 각 라인을 읽어 처리
var line: String?
while (reader.readLine().also { line = it } != null) {
// 각 라인에 대한 처리 수행
println(line)
}
// 작업이 끝나면 리더를 닫습니다.
reader.close()
}
이러면 이제 업로드가 되지만, 파일이 데이터베이스가 아닌 콘솔에만 출력된다. 그럼 이제 이걸 데이터베이스에 옮겨야 하는데???
@PostMapping("/upload", consumes = ["multipart/form-data"])
fun uploadFile(@RequestParam("file") file: MultipartFile) {
if (file.isEmpty) {
// 파일이 비어있는지 확인
println("File is empty")
return
}
// MultipartFile을 BufferedReader로 변환
val reader = BufferedReader(InputStreamReader(file.inputStream))
// CSV 파일의 각 라인을 읽어 처리
var line: String? = reader.readLine()
while (line != null && reader.readLine().also { line = it } != null) {
val data = line!!.split(",")
val store = Store(
createdAt = data[0],
shopName = data[1],
mallName = data[2],
domain = data[3],
email = data[4],
phoneNumber = data[5],
businessType = data[6],
address = data[7],
saleNumber = data[8],
firstReportDate = data[9],
situation = data[10],
totalEvaluation = data[11].toIntOrNull() ?: 0,
withdrawalEvaluation = data[12].toIntOrNull() ?: 0,
businessInformationEvaluation = data[13].toIntOrNull() ?: 0,
approvalEvaluation = data[14].toIntOrNull() ?: 0,
termsEvaluation = data[15].toIntOrNull() ?: 0,
privacyEvaluation = data[16].toIntOrNull() ?: 0,
mainItem = data[17],
withdrawPossible = data[18],
initialScreen = data[19],
payment = data[20],
termCompliance = data[21],
privacyStatement = data[22],
requestTermOver = data[23],
safetyService = data[24],
securityServer = data[25],
certificationMark = data[26],
deliveryDate = data[27],
refundDeliveryFee = data[28],
customerComplaintBoard = data[29],
cancelMembership = data[30],
siteOpening = data[31],
monitoringDate = data[32]
)
storeRepository.save(store)
}
reader.close()
그랬는데,2024-02-22T15:20:44.736+09:00 ERROR 12332 --- [nio-8080-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: column "created_at" is of type timestamp with time zone but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 552 이런오류가 떠서 알아보니까 날짜표현때문에 오류가 났다고 하길래 우선 내csv에도 없고 만들 필요도 없는 created_at을 데이터베이스에 넣어버렸다는걸 알고
package com.teamsparta.hoop.model
import jakarta.persistence.*
@Entity
@Table(name = "store")
data class Store(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val id: Int? = null,
@Column(name = "shop_name")
val shopName: String,
@Column(name = "mall_name")
val mallName: String,
@Column(name = "domain")
val domain: String,
@Column(name = "email")
val email: String,
@Column(name = "phone_number")
val phoneNumber: String,
@Column(name = "business_type")
val businessType: String,
@Column(name = "address")
val address: String,
@Column(name = "sale_number")
val saleNumber: String,
@Column(name = "first_report_date")
val firstReportDate: String,
@Column(name = "situation")
val situation: String,
@Column(name = "total_evaluation")
val totalEvaluation: Int?,
@Column(name = "withdrawal_evaluation")
val withdrawalEvaluation: Int?,
@Column(name = "business_information_evaluation")
val businessInformationEvaluation: Int?,
@Column(name = "approval_evaluation")
val approvalEvaluation: Int?,
@Column(name = "terms_evaluation")
val termsEvaluation: Int?,
@Column(name = "privacy_evaluation")
val privacyEvaluation: Int?,
@Column(name = "main_item")
val mainItem: String,
@Column(name = "withdraw_possible")
val withdrawPossible: String,
@Column(name = "initial_screen")
val initialScreen: String,
@Column(name = "payment")
val payment: String,
@Column(name = "term_compliance")
val termCompliance: String,
@Column(name = "privacy_statement")
val privacyStatement: String,
@Column(name = "request_term_over")
val requestTermOver: String,
@Column(name = "safety_service")
val safetyService: String,
@Column(name = "security_server")
val securityServer: String,
@Column(name = "certification_mark")
val certificationMark: String,
@Column(name = "delivery_date")
val deliveryDate: String,
@Column(name = "refund_delivery_fee")
val refundDeliveryFee: String,
@Column(name = "customer_complaint_board")
val customerComplaintBoard: String,
@Column(name = "cancel_membership")
val cancelMembership: String,
@Column(name = "site_opening")
val siteOpening: String,
@Column(name = "monitoring_date")
val monitoringDate: String
)
@PostMapping("/upload", consumes = ["multipart/form-data"])
fun uploadFile(@RequestParam("file") file: MultipartFile) {
if (file.isEmpty) {
// 파일이 비어있는지 확인
println("File is empty")
return
}
// MultipartFile을 BufferedReader로 변환
val reader = BufferedReader(InputStreamReader(file.inputStream))
// CSV 파일의 각 라인을 읽어 처리
var line: String? = reader.readLine()
while (line != null && reader.readLine().also { line = it } != null) {
val data = line!!.split(",")
val store = Store(
shopName = data[1],
mallName = data[2],
domain = data[3],
email = data[4],
phoneNumber = data[5],
businessType = data[6],
address = data[7],
saleNumber = data[8],
firstReportDate = data[9],
situation = data[10],
totalEvaluation = data[11].toIntOrNull() ?: 0,
withdrawalEvaluation = data[12].toIntOrNull() ?: 0,
businessInformationEvaluation = data[13].toIntOrNull() ?: 0,
approvalEvaluation = data[14].toIntOrNull() ?: 0,
termsEvaluation = data[15].toIntOrNull() ?: 0,
privacyEvaluation = data[16].toIntOrNull() ?: 0,
mainItem = data[17],
withdrawPossible = data[18],
initialScreen = data[19],
payment = data[20],
termCompliance = data[21],
privacyStatement = data[22],
requestTermOver = data[23],
safetyService = data[24],
securityServer = data[25],
certificationMark = data[26],
deliveryDate = data[27],
refundDeliveryFee = data[28],
customerComplaintBoard = data[29],
cancelMembership = data[30],
siteOpening = data[31],
monitoringDate = data[32]
)
storeRepository.save(store)
}
reader.close()
}
이렇게 그 부분을 지워 버렸다.
2024-02-22T16:39:01.205+09:00 ERROR 16760 --- [io-8080-exec-10] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: column "first_report_date" is of type date but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 554
2024-02-22T16:39:01.234+09:00 ERROR 16760 --- [io-8080-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute statement [ERROR: column "first_report_date" is of type date but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
그래도 여전히 이런 에러가 떠서
날짜자체가 문제이기에 바꿔야 한다는걸알았다.
var line: String? = reader.readLine()
while (line != null && reader.readLine().also { line = it } != null) {
val data = line!!.split(",")
val store = Store(
shopName = data[1],
mallName = data[2],
domain = data[3],
email = data[4],
phoneNumber = data[5],
businessType = data[6],
address = data[7],
saleNumber = data[8],
firstReportDate = data[9],
situation = data[10],
totalEvaluation = data[11].toIntOrNull() ?: 0,
withdrawalEvaluation = data[12].toIntOrNull() ?: 0,
businessInformationEvaluation = data[13].toIntOrNull() ?: 0,
approvalEvaluation = data[14].toIntOrNull() ?: 0,
termsEvaluation = data[15].toIntOrNull() ?: 0,
privacyEvaluation = data[16].toIntOrNull() ?: 0,
mainItem = data[17],
withdrawPossible = data[18],
initialScreen = data[19],
payment = data[20],
termCompliance = data[21],
privacyStatement = data[22],
requestTermOver = data[23],
safetyService = data[24],
securityServer = data[25],
certificationMark = data[26],
deliveryDate = data[27],
refundDeliveryFee = data[28],
customerComplaintBoard = data[29],
cancelMembership = data[30],
siteOpening = data[31],
monitoringDate = data[32]
)
storeRepository.save(store)
}
reader.close()
}
이렇게 했더니, 안된 이유는 숫자를 1부터가 아니라0 부터 세기 때문에 시작은 0이여야만 한다는걸 알았다.
var line: String? = reader.readLine()
while (line != null && reader.readLine().also { line = it } != null) {
val data = line!!.split(",")
val store = Store(
shopName = data[0],
mallName = data[1],
domain = data[2],
phoneNumber = data[3],
email = data[4],
businessType = data[5],
address = data[6],
saleNumber = data[7],
firstReportDate = data[8],
situation = data[9],
totalEvaluation = data[10].toIntOrNull() ?: 0,
businessInformationEvaluation = data[11].toIntOrNull() ?: 0,
withdrawalEvaluation = data[12].toIntOrNull() ?: 0,
approvalEvaluation = data[13].toIntOrNull() ?: 0,
termsEvaluation = data[14].toIntOrNull() ?: 0,
privacyEvaluation = data[15].toIntOrNull() ?: 0,
mainItem = data[16],
withdrawPossible = data[17],
initialScreen = data[18],
payment = data[19],
termCompliance = data[20],
privacyStatement = data[21],
requestTermOver = data[22],
safetyService = data[23],
securityServer = data[24],
certificationMark = data[25],
deliveryDate = data[26],
refundDeliveryFee = data[27],
customerComplaintBoard = data[28],
cancelMembership = data[29],
siteOpening = data[30],
monitoringDate = data[31]
)
storeRepository.save(store)
}
reader.close()
}
그러나, 실행결과
2024-02-22T17:42:49.757+09:00 ERROR 13624 --- [nio-8080-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: column "first_report_date" is of type date but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 554 이런 에러가 떠서 찾아본 결과 날짜타입이 데이터베이스와 안맞는다는 결과가 나와서 firstReportDate = LocalDate.parse(data[8]).toString(), 이런식으로 바꾸고 개고생을 했는데 그 다음엔
24-02-22T17:45:25.238+09:00 ERROR 12840 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.time.format.DateTimeParseException: Text '회원탈퇴 가능' could not be parsed at index 0] with root cause
java.time.format.DateTimeParseException: Text '회원탈퇴 가능' could not be parsed at index 0
이렇게 31번으로 날짜가 나와야 하는 부분을 29번이 차지하고 있다... 왜??
그래서 이것저것 시도했는데, 결국 이건 포기하고, 다른 사람들의 과제를 돕고있는 중이다.
val reader = BufferedReader(InputStreamReader(file.inputStream))
// 첫 번째 행(헤더)을 건너뛰기
reader.readLine()
// 이후의 행들을 처리
var line: String? = reader.readLine()
while (line != null) {
// 데이터 처리 로직
line = reader.readLine()
}
reader.close()
이게 첫번째 행을 건너띄는법
방법을 찾았다!!!!
다른사람들 도와주다가 찾았다!!! 남을 도우면 돌고돌아 자신을 돕는다!!!
우선 날짜가 다른 팀원들에게도 걸림돌이 되자 그냥 text로 만들었다.
그러다가 내 테이블이 34개인데 거기에 id랑 게시시간?, 0번으로 시작 그걸빼면 31여야하는데 30이라는 있을수 없는 숫자에 주목하게 되었다! 그리고, 내가 저 날짜를 바꾸려다가 situation 이쪽이 지워져버린 모양이였다. 그래서 31번으로 날짜가 나와야 하는 부분을 29번이 차지한 것이다
@PostMapping("/upload", consumes = ["multipart/form-data"])
fun uploadFile(@RequestParam("file") file: MultipartFile) {
if (file.isEmpty) {
// 파일이 비어있는지 확인
println("File is empty")
return
}
// MultipartFile을 BufferedReader로 변환
val reader = BufferedReader(InputStreamReader(file.inputStream))
// CSV 파일의 각 라인을 읽어 처리
var line: String? = reader.readLine()
while (line != null && reader.readLine().also { line = it } != null) {
val data = line!!.split(",")
val store = Store(
shopName = data[0],
mallName = data[1],
domain = data[2],
phoneNumber = data[3],
email = data[4],
businessType = data[5],
address = data[6],
saleNumber = data[7],
firstReportDate = data[8],
situation = data[9],
totalEvaluation = data[10].toIntOrNull() ?: 0,
businessInformationEvaluation = data[11].toIntOrNull() ?: 0,
withdrawalEvaluation = data[12].toIntOrNull() ?: 0,
approvalEvaluation = data[13].toIntOrNull() ?: 0,
termsEvaluation = data[14].toIntOrNull() ?: 0,
privacyEvaluation = data[15].toIntOrNull() ?: 0,
mainItem = data[16],
withdrawPossible = data[17],
initialScreen = data[18],
payment = data[19],
termCompliance = data[20],
privacyStatement = data[21],
requestTermOver = data[22],
safetyService = data[23],
securityServer = data[24],
certificationMark = data[25],
deliveryDate = data[26],
refundDeliveryFee = data[27],
customerComplaintBoard = data[28],
cancelMembership = data[29],
siteOpening = data[30],
monitoringDate = data[31]
)
storeRepository.save(store)
}
reader.close()
}
해결!