@Component
public class ServiceEnvConstants {

	/** 公钥-从详情页面获取 */
	public static String publicKey;
	@Value("${public_key}")
	public void setPublicKey(String publicKey) {
		ServiceEnvConstants.publicKey = publicKey;
	}

	/** 字符编码-传递给数据编码 */
	public static final String CHARSET = "UTF-8";

	
}

 Spring在初始化有几种方式,注意初始化先后顺序

相关文章:

  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案