Skip to content

Commit 64c8e7b

Browse files
Merge pull request #32 from EntryDSM/feature/31-lisense
feature/31-lisense
2 parents 5d2643d + 4b7e4a7 commit 64c8e7b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

casper-user/src/main/kotlin/hs/kr/entrydsm/user/global/config/LicenseConfig.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import java.io.IOException
77
import java.net.URL
88
import java.nio.file.Files
99
import java.nio.file.Paths
10+
import java.nio.file.StandardCopyOption
1011

1112
/**
1213
* 패스 인증 라이센스 파일을 다운로드하고 설정하는 클래스입니다.
@@ -18,13 +19,14 @@ class LicenseConfig(
1819
) {
1920
/**
2021
* 애플리케이션 시작 시 라이센스 파일을 다운로드합니다.
22+
* 기존 파일이 있어도 최신 버전으로 덮어씁니다.
2123
*/
2224
@PostConstruct
2325
fun initialize() {
2426
try {
2527
URL(licenseFileURl).openStream()
2628
.use { inputStream ->
27-
Files.copy(inputStream, Paths.get(PATH))
29+
Files.copy(inputStream, Paths.get(PATH), StandardCopyOption.REPLACE_EXISTING)
2830
}
2931
} catch (e: IOException) {
3032
e.printStackTrace()

0 commit comments

Comments
 (0)