随便小记

package com.yiba.manage.common.spring.exetend;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

import java.util.Properties;

public class ExtendedPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer {
    private Properties props;

    @Override
    protected void processProperties(ConfigurableListableBeanFactory beanFactory, Properties props)
            throws BeansException {
        super.processProperties(beanFactory, props);
        this.props = props;
    }

    public String getProperty(String key) {
        return props.getProperty(key);
    }
}

 

posted @ 2016-07-13 13:45  三胖、*码狗  阅读(71)  评论(0)    收藏  举报