1.类上加入注解制定properties文件
@PropertySource("classpath:downloadPath.properties")
2.在变量上加入注解就赋值了
@Value("${com.gl.crpt.fileSite}")
private String site;
3.downloadPath.properties文件内容
com.gl.crpt.fileSite=C:/test/
1.类上加入注解制定properties文件
@PropertySource("classpath:downloadPath.properties")
2.在变量上加入注解就赋值了
@Value("${com.gl.crpt.fileSite}")
private String site;
3.downloadPath.properties文件内容
com.gl.crpt.fileSite=C:/test/