package com.safeluck.aaej.app.config
|
|
import org.springframework.core.io.support.PropertiesLoaderUtils
|
import org.springframework.stereotype.Component
|
import java.io.IOException
|
import javax.annotation.PostConstruct
|
|
|
@Component
|
class AppSettings {
|
|
var debug: Boolean = false
|
val aliyunImageServer:String="//image.aaej.cn/"
|
var smsAppId:String = ""
|
var smsAppSign:String = ""
|
|
@PostConstruct
|
@Throws(IOException::class)
|
fun initConfigs() {
|
val properties = PropertiesLoaderUtils.loadAllProperties("config.properties", this.javaClass.classLoader)
|
this.debug = "true" == properties.getProperty("debug", "false")
|
this.smsAppId = properties.getProperty("config.smsAppId", "3")
|
this.smsAppSign = properties.getProperty("config.smsAppSign", "d845ccaaa3361273d2fb5c1c19dccbf2")
|
|
}
|
|
}
|