We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5d2643d + 4b7e4a7 commit 64c8e7bCopy full SHA for 64c8e7b
1 file changed
casper-user/src/main/kotlin/hs/kr/entrydsm/user/global/config/LicenseConfig.kt
@@ -7,6 +7,7 @@ import java.io.IOException
7
import java.net.URL
8
import java.nio.file.Files
9
import java.nio.file.Paths
10
+import java.nio.file.StandardCopyOption
11
12
/**
13
* 패스 인증 라이센스 파일을 다운로드하고 설정하는 클래스입니다.
@@ -18,13 +19,14 @@ class LicenseConfig(
18
19
) {
20
21
* 애플리케이션 시작 시 라이센스 파일을 다운로드합니다.
22
+ * 기존 파일이 있어도 최신 버전으로 덮어씁니다.
23
*/
24
@PostConstruct
25
fun initialize() {
26
try {
27
URL(licenseFileURl).openStream()
28
.use { inputStream ->
- Files.copy(inputStream, Paths.get(PATH))
29
+ Files.copy(inputStream, Paths.get(PATH), StandardCopyOption.REPLACE_EXISTING)
30
}
31
} catch (e: IOException) {
32
e.printStackTrace()
0 commit comments