p6spy-spring-boot-starter

快速集成p6spy的spring boot starter

License

License

Categories

Categories

Spring Boot Container Microservices p6spy Application Layer Libs Logging
GroupId

GroupId

com.github.klboke
ArtifactId

ArtifactId

p6spy-spring-boot-starter
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

p6spy-spring-boot-starter
快速集成p6spy的spring boot starter
Project URL

Project URL

https://github.com/klboke/p6spy-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/klboke/p6spy-spring-boot-starter.git

Download p6spy-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.klboke/p6spy-spring-boot-starter/ -->
<dependency>
    <groupId>com.github.klboke</groupId>
    <artifactId>p6spy-spring-boot-starter</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.klboke/p6spy-spring-boot-starter/
implementation 'com.github.klboke:p6spy-spring-boot-starter:1.0'
// https://jarcasting.com/artifacts/com.github.klboke/p6spy-spring-boot-starter/
implementation ("com.github.klboke:p6spy-spring-boot-starter:1.0")
'com.github.klboke:p6spy-spring-boot-starter:jar:1.0'
<dependency org="com.github.klboke" name="p6spy-spring-boot-starter" rev="1.0">
  <artifact name="p6spy-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.klboke', module='p6spy-spring-boot-starter', version='1.0')
)
libraryDependencies += "com.github.klboke" % "p6spy-spring-boot-starter" % "1.0"
[com.github.klboke/p6spy-spring-boot-starter "1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
p6spy : p6spy jar 3.8.6
org.springframework.boot : spring-boot-autoconfigure Optional jar 2.2.0.RELEASE

test (3)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 2.2.0.RELEASE
org.springframework.boot : spring-boot-starter-web Optional jar 2.2.0.RELEASE
org.springframework.boot : spring-boot-starter Optional jar 2.2.0.RELEASE

Project Modules

There are no modules declared in this project.

p6spy-spring-boot-starter

Spring boot application integrates p6spy print logs quickly

p6spy:https://github.com/p6spy/p6spy

Quick start

  • 一、Import dependencies
        <dependency>
            <groupId>com.github.klboke</groupId>
            <artifactId>p6spy-spring-boot-starter</artifactId>
            <version>1.0</version>
        </dependency>
  • 二、Configure the application.properties Configuration starts with "p6spy.config." compatible with p6spy's system properties configuration
spring.datasource.url = jdbc:p6spy:mysql://xxx
spring.datasource.username = xxx
spring.datasource.password = xxx
spring.datasource.driver-class-name = com.p6spy.engine.spy.P6SpyDriver

p6spy.config.appender = com.p6spy.engine.spy.appender.Slf4JLogger
p6spy.config.logMessageFormat = com.p6spy.engine.spy.appender.CustomLineFormat
p6spy.config.customLogMessageFormat = executionTime:%(executionTime)| 执行sql:%(sqlSingleLine)

By default import dependency, p6spy auto assembly will take effect, you can turn it off by "p6spy.config.enabled = false"

Configuration description

Versions

Version
1.0