GithubHelp home page GithubHelp logo

joker-pper / p6spy-starter Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 12 KB

通过属性配置便可以自动替换springboot数据源中p6spy的配置(支持常见数据库).p6spy spring boot quick starter

License: Apache License 2.0

Java 100.00%

p6spy-starter's Introduction

p6spy-starter

Maven Central License

通过属性配置便可以自动替换springboot数据源中p6spy的配置(支持常见数据库).

项目地址

https://github.com/joker-pper/p6spy-starter

https://gitee.com/joker-pper/p6spy-starter

功能介绍

  • 仅对springboot中的环境变量配置进行自动替换 (p6spy使用方式与原来一致)

  • 无需改变原数据源配置内容便可实现引入p6spy (一定程度可减少引入p6spy更改配置错误)

  • 动态控制是否启用p6spy功能

  • 支撑定制化处理指定driverKey和urlKey的替换

快速使用


<dependency>
  <groupId>io.github.joker-pper</groupId>
  <artifactId>p6spy-starter</artifactId>
  <version>${version}</version>
</dependency>

属性配置

    spring.datasource.p6spy.enable   
     
        描述:
            是否启用组件功能,关闭后将不会生效
        
        缺省值:
            false

    spring.datasource.p6spy.quick   
     
        描述:
            是否启用快速模式,开启后将自动替换默认数据源的配置,其中
                driver class name keys:
                    spring.datasource.driver-class-name
                    spring.datasource.driverClassName
            
                url keys:
                    spring.datasource.url
        缺省值:
            true
    
    spring.datasource.p6spy.customize.url-keys
     
        描述:
            自定义要处理的url keys,多个值时用,分割

    spring.datasource.p6spy.customize.driver-class-name-keys    
     
        描述:
            自定义要处理的driver class name keys,多个值时用,分割



属性配置示例


properties格式

spring.datasource.p6spy.enable=true
spring.datasource.p6spy.quick=true
spring.datasource.p6spy.customize.url-keys=spring.datasource.second.url
spring.datasource.p6spy.customize.driver-class-name-keys=spring.datasource.second.driverClassName,spring.datasource.second.driver-class-name


yml格式

spring:
  datasource:
    p6spy:
      enable: true
      quick: true
      customize:
        url-keys: spring.datasource.second.url
        driver-class-name-keys: spring.datasource.second.driverClassName,spring.datasource.second.driver-class-name

示例项目

https://github.com/joker-pper/p6spy-starter-samples

https://gitee.com/joker-pper/p6spy-starter-samples

其他

    https://github.com/p6spy/p6spy
    
    https://www.javadoc.io/doc/p6spy/p6spy/latest/index.html
    
    https://p6spy.readthedocs.io/en/latest/configandusage.html
    

p6spy-starter's People

Contributors

joker-pper avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.