Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hiwepy/p6spy-spring-boot-starter
spring-boot-starter-p6spy
https://github.com/hiwepy/p6spy-spring-boot-starter
Last synced: 23 days ago
JSON representation
spring-boot-starter-p6spy
- Host: GitHub
- URL: https://github.com/hiwepy/p6spy-spring-boot-starter
- Owner: hiwepy
- License: apache-2.0
- Created: 2018-03-28T04:12:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-20T15:08:32.000Z (3 months ago)
- Last Synced: 2024-10-20T16:40:44.411Z (3 months ago)
- Language: Java
- Size: 47.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# p6spy-spring-boot-starter
p6spy starter for spring boot### 说明
> 基于 p6spy 的 Spring Boot Starter 实现
### Maven
``` xml
com.github.hiwepy
p6spy-spring-boot-starter
${project.version}```
### Sample
```java
import javax.sql.DataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;import com.p6spy.engine.spy.P6DriverManagerDataSource;
import com.p6spy.spring.boot.ext.P6spyDataSource;@EnableP6Spy
@SpringBootApplication
public class Application {
@Bean
@P6spyDataSource
DataSource dataSource() {
// just demo
P6DriverManagerDataSource ds = new P6DriverManagerDataSource();
ds.setUrl("url");
ds.setUser("username");
ds.setPassword("password");
return ds;
};
public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args);
}}
```