private fun templateFile(templateFile: File, params: JsonNode, destinationFolder: File) {
val finalFile = File(destinationFolder.path.plus(File.separator).plus(templateFile.nameWithoutExtension))
- val fileContent = templateFile.bufferedReader().readText()
+ val fileContent = Files.readString(templateFile.toPath())
val finalFileContent = BluePrintVelocityTemplateService.generateContent(
fileContent,
params.toString(), true
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import java.io.File
+import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
}
private fun templateValues(templateFile: File, params: JsonNode): String {
- val fileContent = templateFile.bufferedReader().readText()
+ val fileContent = Files.readString(templateFile.toPath())
return BluePrintVelocityTemplateService.generateContent(
fileContent,
params.toString(), true