# spring-boot-starter-ant-resources **Repository Path**: antcore/spring-boot-starter-ant-resources ## Basic Information - **Project Name**: spring-boot-starter-ant-resources - **Description**: 一个资源加载工具,将自定义配置加载到Spring当中,支持yaml,properties,xml,db,git等不同配置源; - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 1 - **Created**: 2018-08-07 - **Last Updated**: 2021-12-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # spring-boot-starter-ant-resources #### 项目介绍 一个即时刷新变更配置文件的工具jar包; 支持yaml,properties,xml,db,git等不同配置源; [![Maven metadata URI](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/cn/antcore/spring-boot-starter-ant-resources/maven-metadata.xml.svg)](https://mvnrepository.com/artifact/cn.antcore/spring-boot-starter-ant-resources) [![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://mvnrepository.com/artifact/cn.antcore/spring-boot-starter-ant-resources) [![jdk](https://img.shields.io/badge/JDK-1.7+-green.svg)](https://mvnrepository.com/artifact/cn.antcore/spring-boot-starter-ant-resources) #### 软件架构 后期补充 #### 安装教程 Maven仓库坐标: ```xml cn.antcore spring-boot-starter-ant-resources ${Maven仓库最新版本} compile ``` #### 使用说明 更多使用教程:[https://gitee.com/antcore/AntCoreDemo](https://gitee.com/antcore/AntCoreDemo) 1. 如果只是简单的将各种资源配置加载的Spring中,只需要一步即可;/resources目录建立application名字的资源文件;包含属性ant.core.config.source,设置需要加载的资源; ```yaml ant: core: resources: profile: dev config: source: classpath:service.yml, file:D:\demo.yml, db:tb_config, git:common ``` > 优先从Spring环境中读取上述配置,如果环境不存在该配置,再从默认配置(application.yml|application.properties|application.xml)中读取; 2.如果想要配置变更后,Spring中引入资源的地方也自动更新的话,可能需要下面几步: * 启动类上加入:@EnableAntCoreResources注解; ```java @SpringBootApplication @EnableAntCoreResources public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } ``` 3.支持资源Value加密,更多加密使用请参考:[https://gitee.com/antcore/AntResources](https://gitee.com/antcore/AntResources) #### 交流群 1. QQ群:499033245