Skip to content

Commit

Permalink
Bump ShardingSphere JDBC in Example to 5.5.1 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian authored Oct 22, 2024
1 parent 7161e9f commit 6de357c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 25 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ on:
pull_request:
branches: [ master ]

concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
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

jobs:
test-hotspot-jdk-ci:
name: Test CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }}
Expand All @@ -33,7 +26,6 @@ jobs:
- name: Build all test with Maven
run: |
./mvnw -T1C -B -e clean test
test-minimum-hotspot-jdk-ci:
name: Test CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
5 changes: 3 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.1
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- quartz-sample 多数据源集成quartz示例
- shardingsphere-jdbc-4.x-spring-sample 集成 ShardingSphere JDBC Spring Boot Starter 4.1.1 使用示例, 不再维护,
参考 https://github.com/apache/shardingsphere/releases/tag/5.0.0-alpha
- shardingsphere-jdbc-5.x-core-sample 集成 ShardingSphere JDBC Driver 5.5.0 使用示例
- shardingsphere-jdbc-5.x-core-sample 集成 ShardingSphere JDBC Driver 5.5.1 使用示例
- shardingsphere-jdbc-5.x-spring-sample 集成 ShardingSphere JDBC Spring Boot Starter 5.2.1 使用示例, 不再维护,
参考 https://github.com/apache/shardingsphere/issues/22469
- spel-sample 动态从外部参数spel来切换数据源的使用示例
Expand Down
17 changes: 13 additions & 4 deletions mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.1
# Apache Maven Wrapper startup batch script, version 3.3.2
#
# Optional ENV vars
# -----------------
Expand Down Expand Up @@ -97,11 +97,19 @@ die() {
exit 1
}

trim() {
# MWRAPPER-139:
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
# Needed for removing poorly interpreted newline sequences when running in more
# exotic environments such as mingw bash on Windows.
printf "%s" "${1}" | tr -d '[:space:]'
}

# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
case "${key-}" in
distributionUrl) distributionUrl="${value-}" ;;
distributionSha256Sum) distributionSha256Sum="${value-}" ;;
distributionUrl) distributionUrl=$(trim "${value-}") ;;
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
esac
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
Expand Down Expand Up @@ -131,7 +139,8 @@ esac
distributionUrlName="${distributionUrl##*/}"
distributionUrlNameMain="${distributionUrlName%.*}"
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
MAVEN_HOME="$HOME/.m2/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"

exec_maven() {
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
Expand Down
5 changes: 4 additions & 1 deletion mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@REM ----------------------------------------------------------------------------

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

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.5.0</shardingsphere.version>
<shardingsphere.version>5.5.1</shardingsphere.version>
</properties>

<dependencies>
Expand All @@ -32,13 +32,6 @@
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc</artifactId>
<version>${shardingsphere.version}</version>
<exclusions>
<!--Affected by https://github.com/apache/shardingsphere/issues/31128-->
<exclusion>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-test-util</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rules:
baomidou_snowflake:
type: SNOWFLAKE
- !READWRITE_SPLITTING
dataSources:
dataSourceGroups:
baomidou_readwrite_data_sources:
writeDataSourceName: shardingmaster
readDataSourceNames:
Expand Down

0 comments on commit 6de357c

Please sign in to comment.