budo-jdbc-sharding-proxy

This commit is contained in:
黎明伟 2020-06-17 13:30:35 +08:00
parent 699e97ba7b
commit f39709c2e5
11 changed files with 145 additions and 9 deletions

View File

@ -1,10 +1,41 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project
<modelVersion>4.0.0</modelVersion> xmlns="http://maven.apache.org/POM/4.0.0"
<parent> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<groupId>budo-jdbc</groupId> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>budo-jdbc</artifactId> <modelVersion>4.0.0</modelVersion>
<groupId>org.budo</groupId>
<artifactId>budo-excel-jdbc-driver</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>budo-excel-jdbc-driver</groupId> <distributionManagement>
<artifactId>budo-excel-jdbc-driver</artifactId> <snapshotRepository>
<id>budo-snapshot-repository</id>
<url>${budo-snapshot-repository-url}</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<elasticsearch.version>2.4.5</elasticsearch.version>
<budo-snapshot-repository-url>https://repo.rdc.aliyun.com/repository/1726-snapshot-ZLxSbx/</budo-snapshot-repository-url>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -0,0 +1,5 @@
# budo-jdbc-sharding-proxy
[shardingsphere-proxy-boot-mybatis-example](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-proxy-example/shardingsphere-proxy-boot-mybatis-example/src/main/resources/conf)
[shardingsphere-proxy-hint-example](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-proxy-example/shardingsphere-proxy-hint-example/src/main/resources/conf)

View File

@ -0,0 +1,50 @@
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.budo</groupId>
<artifactId>budo-jdbc-sharding-proxy</artifactId>
<version>0.0.1-SNAPSHOT</version>
<distributionManagement>
<snapshotRepository>
<id>budo-snapshot-repository</id>
<url>${budo-snapshot-repository-url}</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<elasticsearch.version>2.4.5</elasticsearch.version>
<budo-snapshot-repository-url>https://repo.rdc.aliyun.com/repository/1726-snapshot-ZLxSbx/</budo-snapshot-repository-url>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-proxy-bootstrap</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,6 @@
package org.budo.jdbc.sharding.proxy.recognizer;
/**
* @author lmw
*/
public class BudoMongoRecognizer {}

View File

@ -0,0 +1,12 @@
package org.budo.jdbc.sharding.proxy;
import org.apache.shardingsphere.shardingproxy.Bootstrap;
/**
* @author lmw
*/
public class ShardingProxy {
public static void main(String[] args) throws Throwable {
Bootstrap.main(args);
}
}

View File

@ -0,0 +1,6 @@
schemaName: master_only
dataSources:
ds_master:
url: jdbc:mysql://192.168.4.32:27017/taobao

View File

@ -0,0 +1,9 @@
authentication:
users:
root:
password: root
props:
max.connections.size.per.query: 1
proxy.transaction.type: LOCAL
sql.show: false

View File

@ -0,0 +1,6 @@
schemaName: master_only
dataSources:
ds_master:
url: jdbc:mysql://192.168.4.32:27017/taobao

View File

@ -0,0 +1,9 @@
authentication:
users:
root:
password: root
props:
max.connections.size.per.query: 1
proxy.transaction.type: LOCAL
sql.show: false

View File

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>budo-jdbc</groupId> <groupId>org.budo</groupId>
<artifactId>budo-jdbc</artifactId> <artifactId>budo-jdbc</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
@ -24,5 +24,6 @@
<module>budo-mongo-jdbc-driver</module> <module>budo-mongo-jdbc-driver</module>
<module>budo-redis-jdbc-driver</module> <module>budo-redis-jdbc-driver</module>
<module>budo-solr-jdbc-driver</module> <module>budo-solr-jdbc-driver</module>
<module>budo-jdbc-sharding-proxy</module>
</modules> </modules>
</project> </project>