Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
huayanYu committed Oct 23, 2023
1 parent 30b7d1c commit 00917ed
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.baomidou.samples.druid.filters;

import com.alibaba.druid.filter.FilterAdapter;
import com.alibaba.druid.filter.FilterChain;
import com.alibaba.druid.proxy.jdbc.PreparedStatementProxy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.sql.SQLException;

@Slf4j
@Component("myFilter1")
public class Filter1 extends FilterAdapter {

@Override
public int preparedStatement_executeUpdate(FilterChain chain, PreparedStatementProxy statement) throws SQLException {
log.info("ssss");
return super.preparedStatement_executeUpdate(chain, statement);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.baomidou.samples.druid.filters;

import com.alibaba.druid.filter.FilterAdapter;
import com.alibaba.druid.filter.FilterChain;
import com.alibaba.druid.proxy.jdbc.PreparedStatementProxy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.sql.SQLException;

@Slf4j
@Component("myFilter2")
public class Filter2 extends FilterAdapter {

@Override
public int preparedStatement_executeUpdate(FilterChain chain, PreparedStatementProxy statement) throws SQLException {
log.info("ssss");
return super.preparedStatement_executeUpdate(chain, statement);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spring:
min-idle: 3
max-wait: 1000
validation-query: 'select 1'
proxy-filters: myFilter1,myFilter2
datasource:
master:
username: sa
Expand Down
4 changes: 4 additions & 0 deletions features-samples/load-datasource-from-jdbc-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
spring:
datasource:
dynamic:
druid:
filters: ""
datasource:
master:
username: sa
Expand Down
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>

<ds.version>4.1.3</ds.version>
<ds.version>4.2.0</ds.version>
<mybatis-spring-boot-starter.version>2.3.1</mybatis-spring-boot-starter.version>
<druid.version>1.2.18</druid.version>
<druid.version>1.2.20</druid.version>
<p6spy.version>3.9.1</p6spy.version>
<h2.version>2.2.220</h2.version>
<spring-boot-dependencies.version>2.7.16</spring-boot-dependencies.version>
<h2.version>2.2.224</h2.version>
<spring-boot-dependencies.version>2.7.17</spring-boot-dependencies.version>
<lombok.version>1.18.30</lombok.version>
</properties>

Expand Down Expand Up @@ -78,6 +78,11 @@
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-3-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions springboot3-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-boot-dependencies.version>3.1.3</spring-boot-dependencies.version>
<spring-boot-dependencies.version>3.1.5</spring-boot-dependencies.version>
<mybatis-spring-boot-starter.version>3.0.2</mybatis-spring-boot-starter.version>
</properties>

Expand Down Expand Up @@ -45,7 +45,6 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-3-starter</artifactId>
<version>1.2.18</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -74,7 +73,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.24</version>
<version>0.9.28</version>
<configuration>
<buildArgs combine.children="append">
<buildArg>--enable-preview</buildArg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>shardingsphere-jdbc-5.x-core-sample</artifactId>

<properties>
<shardingsphere.version>5.4.0</shardingsphere.version>
<shardingsphere.version>5.4.1</shardingsphere.version>
</properties>

<dependencies>
Expand Down

0 comments on commit 00917ed

Please sign in to comment.