templates.common.MapTencentProperties.ftl Maven / Gradle / Ivy
package ${packageName}.common.properties;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 腾讯云地图配置类
*
* @author xz
* @date 2022年 11月25日 16:00:37
*/
@Component
@ConfigurationProperties(prefix = "map.tencent")
public class MapTencentProperties implements InitializingBean {
@Value("${r'${map.tencent.key}'}")
private String key;
@Value("${r'${map.tencent.secretKey}'}")
private String secretKey;
public static String KEY;
public static String SECRET_KEY;
@Override
public void afterPropertiesSet() throws Exception {
KEY = this.key;
SECRET_KEY = this.secretKey;
}
}