# DisConfClient **Repository Path**: elizhang/DisConfClient ## Basic Information - **Project Name**: DisConfClient - **Description**: 分布式属性文件管理系统客户端 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-02-05 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DisConfClient ## 1. 在项目的 resource 文件夹下添加 application.properties 文件,内容如下: dis_conf_path=http://{host}:{port}/api/property/ ## 2. PropertySource 的使用方式 @PropertySource(name="xhy-wifi",value="application",factory=HttpDisPropertySourceFactory.class) public class AuthServiceImpl implements IFatApService { @Value("${type}") private String type; } ## 3. 替换 XML 配置文件,PropertyPlaceholderConfigurer 在 xml 配置文件中如果想要替换 jdbc 、redis 配置信息需要使用下面的配置信息 ~~~ http://{host}:{port}/api/property/{project_name} http://{host}:{port}/api/property/{project_name}/{file_name} ~~~ ## 4. 在 resources 目录下添加 application.properties,内容如下: ~~~ dis_conf_path=http://{host}:{port}/api/property/ user_name=admin pass_word=admin ~~~