init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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) // Создаем папку, если её нет
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user