Spring获取配置文件中的值的一种方式

1、加载配置文件

<context:property-placeholder location="classpath:resource/*.properties">

2、在程序中

@Value("${FTP_ADDRESS}")

private String FTP_ADDRESS; 

原文地址:https://www.cnblogs.com/aaron-leb/p/5709543.html