11
zhouwei
2019-07-12 143f7be25ff19896e70ffc486999a64a3bc3b76f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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")
 
    }
 
}