18 lines
491 B
Kotlin
18 lines
491 B
Kotlin
package space.luminic.finance.configs
|
|
|
|
import org.springframework.beans.factory.annotation.Value
|
|
import org.springframework.context.annotation.Configuration
|
|
import java.nio.file.Files
|
|
import java.nio.file.Path
|
|
import java.nio.file.Paths
|
|
|
|
|
|
@Configuration
|
|
class StorageConfig(@Value("\${storage.location}") location: String) {
|
|
|
|
val rootLocation: Path = Paths.get(location)
|
|
|
|
init {
|
|
Files.createDirectories(rootLocation) // Создаем папку, если её нет
|
|
}
|
|
} |