获取application.properties的参数

一般采用:@Value(“${}”) 进行获取,例如:

@Service
public class SystemConfigServiceImpl {
    @Value("${suiteId}")
    private Long suiteId;
    public Long getSuiteId(){
       return suiteId;
    }
}
//其他类中加载该类
@Resource
private SystemConfigServiceImpl systemConfigService;
//调用
systemConfigService.getSuiteId();