Complete core functions #9

Merged
FatttSnake merged 171 commits from FatttSnake into dev 2024-02-23 11:56:35 +08:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 05bbd59eb0 - Show all commits

View File

@@ -55,7 +55,7 @@ fun main(args: Array<String>) {
if (File("application-config.yml").exists() || File("data/application-config.yml").exists()) { if (File("application-config.yml").exists() || File("data/application-config.yml").exists()) {
runApplication<FatWebApiApplication>(*args) runApplication<FatWebApiApplication>(*args)
} else { } else {
logger.warn("File 'application.yml' cannot be found in data path. The configuration file template 'application.example.yml' has been created in directory 'data'. Please change the configuration file content, rename it to 'application.yml', and then restart the server.") logger.warn("File 'application-config.yml' cannot be found in the running path or the data path. The configuration file template 'application-config.example.yml' has been created in directory 'data'. Please change the configuration file content, move it to the running path, rename it to 'application-config.yml', and then restart the server.")
FatWebApiApplication::class.java.getResource("/application-config-template.yml")?.readText()?.let { FatWebApiApplication::class.java.getResource("/application-config-template.yml")?.readText()?.let {
File("data/application-config.example.yml").writeText( File("data/application-config.example.yml").writeText(
it.replace( it.replace(

View File

@@ -15,7 +15,7 @@ import kotlin.reflect.KMutableProperty1
* @since 1.0.0 * @since 1.0.0
*/ */
object SettingsOperator { object SettingsOperator {
private const val SETTINGS_FILE_NAME = "data/config/settings.yaml" private const val SETTINGS_FILE_NAME = "data/config/settings.yml"
private val yamlMapper = YAMLMapper() private val yamlMapper = YAMLMapper()
private val settingFile = File(SETTINGS_FILE_NAME) private val settingFile = File(SETTINGS_FILE_NAME)