Skip to content

Commit 6de357c

Browse files
authored
Bump ShardingSphere JDBC in Example to 5.5.1 (#41)
1 parent 7161e9f commit 6de357c

File tree

7 files changed

+23
-25
lines changed

7 files changed

+23
-25
lines changed

.github/workflows/ci.yml

-8
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ on:
66
pull_request:
77
branches: [ master ]
88

9-
concurrency:
10-
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
12-
13-
env:
14-
MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true
15-
169
jobs:
1710
test-hotspot-jdk-ci:
1811
name: Test CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }}
@@ -33,7 +26,6 @@ jobs:
3326
- name: Build all test with Maven
3427
run: |
3528
./mvnw -T1C -B -e clean test
36-
3729
test-minimum-hotspot-jdk-ci:
3830
name: Test CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }}
3931
runs-on: ${{ matrix.os }}

.mvn/wrapper/maven-wrapper.properties

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
wrapperVersion=3.3.1
18-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- quartz-sample 多数据源集成quartz示例
2020
- shardingsphere-jdbc-4.x-spring-sample 集成 ShardingSphere JDBC Spring Boot Starter 4.1.1 使用示例, 不再维护,
2121
参考 https://github.com/apache/shardingsphere/releases/tag/5.0.0-alpha
22-
- shardingsphere-jdbc-5.x-core-sample 集成 ShardingSphere JDBC Driver 5.5.0 使用示例
22+
- shardingsphere-jdbc-5.x-core-sample 集成 ShardingSphere JDBC Driver 5.5.1 使用示例
2323
- shardingsphere-jdbc-5.x-spring-sample 集成 ShardingSphere JDBC Spring Boot Starter 5.2.1 使用示例, 不再维护,
2424
参考 https://github.com/apache/shardingsphere/issues/22469
2525
- spel-sample 动态从外部参数spel来切换数据源的使用示例

mvnw

+13-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# ----------------------------------------------------------------------------
2020

2121
# ----------------------------------------------------------------------------
22-
# Apache Maven Wrapper startup batch script, version 3.3.1
22+
# Apache Maven Wrapper startup batch script, version 3.3.2
2323
#
2424
# Optional ENV vars
2525
# -----------------
@@ -97,11 +97,19 @@ die() {
9797
exit 1
9898
}
9999

100+
trim() {
101+
# MWRAPPER-139:
102+
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
103+
# Needed for removing poorly interpreted newline sequences when running in more
104+
# exotic environments such as mingw bash on Windows.
105+
printf "%s" "${1}" | tr -d '[:space:]'
106+
}
107+
100108
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
101109
while IFS="=" read -r key value; do
102110
case "${key-}" in
103-
distributionUrl) distributionUrl="${value-}" ;;
104-
distributionSha256Sum) distributionSha256Sum="${value-}" ;;
111+
distributionUrl) distributionUrl=$(trim "${value-}") ;;
112+
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
105113
esac
106114
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
107115
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
@@ -131,7 +139,8 @@ esac
131139
distributionUrlName="${distributionUrl##*/}"
132140
distributionUrlNameMain="${distributionUrlName%.*}"
133141
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
134-
MAVEN_HOME="$HOME/.m2/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
142+
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
143+
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
135144

136145
exec_maven() {
137146
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :

mvnw.cmd

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@REM ----------------------------------------------------------------------------
2020

2121
@REM ----------------------------------------------------------------------------
22-
@REM Apache Maven Wrapper startup batch script, version 3.3.1
22+
@REM Apache Maven Wrapper startup batch script, version 3.3.2
2323
@REM
2424
@REM Optional ENV vars
2525
@REM MVNW_REPOURL - repo url base for downloading maven distribution
@@ -79,6 +79,9 @@ if ($env:MVNW_REPOURL) {
7979
$distributionUrlName = $distributionUrl -replace '^.*/',''
8080
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
8181
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
82+
if ($env:MAVEN_USER_HOME) {
83+
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
84+
}
8285
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
8386
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
8487

third-part-samples/shardingsphere-sample/shardingsphere-jdbc-5.x-core-sample/pom.xml

+1-8
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<artifactId>shardingsphere-jdbc-5.x-core-sample</artifactId>
1313

1414
<properties>
15-
<shardingsphere.version>5.5.0</shardingsphere.version>
15+
<shardingsphere.version>5.5.1</shardingsphere.version>
1616
</properties>
1717

1818
<dependencies>
@@ -32,13 +32,6 @@
3232
<groupId>org.apache.shardingsphere</groupId>
3333
<artifactId>shardingsphere-jdbc</artifactId>
3434
<version>${shardingsphere.version}</version>
35-
<exclusions>
36-
<!--Affected by https://github.com/apache/shardingsphere/issues/31128-->
37-
<exclusion>
38-
<groupId>org.apache.shardingsphere</groupId>
39-
<artifactId>shardingsphere-test-util</artifactId>
40-
</exclusion>
41-
</exclusions>
4235
</dependency>
4336
<dependency>
4437
<groupId>org.mybatis.spring.boot</groupId>

third-part-samples/shardingsphere-sample/shardingsphere-jdbc-5.x-core-sample/src/main/resources/config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ rules:
4040
baomidou_snowflake:
4141
type: SNOWFLAKE
4242
- !READWRITE_SPLITTING
43-
dataSources:
43+
dataSourceGroups:
4444
baomidou_readwrite_data_sources:
4545
writeDataSourceName: shardingmaster
4646
readDataSourceNames:

0 commit comments

Comments
 (0)