Skip to content

Commit 8de326c

Browse files
author
lbw
committed
🔖 Releasing / Version tags. 0.0.7
1 parent 967a020 commit 8de326c

File tree

7 files changed

+98
-23
lines changed

7 files changed

+98
-23
lines changed

.github/workflows/maven.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: idempotent-spring-boot-starter
5+
6+
on:
7+
push:
8+
branches: [ master,dev ]
9+
pull_request:
10+
branches: [ master,dev ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v2
19+
with:
20+
java-version: '11'
21+
distribution: 'adopt'
22+
23+
- name: mvn clean install
24+
run: mvn clean install -Dmaven.test.skip=true
25+
26+
- name: mvn spring-javaformat:validate
27+
run: mvn spring-javaformat:validate

.github/workflows/oss-deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: publish maven package
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
oss-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Set up JDK 11
15+
uses: actions/setup-java@v2
16+
with:
17+
java-version: '11'
18+
distribution: 'adopt'
19+
cache: maven
20+
21+
# - name: Build with Maven
22+
# run: mvn -B package --file pom.xml
23+
24+
# - name: Publish to GitHub Packages Apache Maven
25+
# run: mvn deploy
26+
# env:
27+
# GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
28+
29+
- name: Setup Maven Central
30+
uses: actions/setup-java@v3
31+
with: # overwrite settings.xml
32+
java-version: '11'
33+
distribution: 'adopt'
34+
server-id: sonatype
35+
server-username: OSSRH_USERNAME
36+
server-password: OSSRH_PASSWORD
37+
gpg-private-key: ${{ secrets.MAVEN_GPG_KEY }}
38+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
39+
40+
- name: Publish to Maven Central
41+
run: mvn clean deploy -Dmaven.test.skip=true -P 'release'
42+
env:
43+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
44+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
45+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<dependency>
3333
<groupId>com.pig4cloud.plugin</groupId>
3434
<artifactId>multilevel-cache-spring-boot-starter</artifactId>
35-
<version>0.0.6</version>
35+
<version>0.0.7</version>
3636
</dependency>
3737
```
3838

pom.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.6.7</version>
8+
<version>2.6.0</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.pig4cloud.plugin</groupId>
1212
<artifactId>multilevel-cache-spring-boot-starter</artifactId>
13-
<version>0.0.6</version>
13+
<version>0.0.7</version>
1414
<name>multilevel-cache-spring-boot-starter</name>
1515
<description>support L1 caffeine and L2 redis cache</description>
1616
<url>https://pig4cloud.com</url>
@@ -30,15 +30,15 @@
3030
</developers>
3131
<scm>
3232
<tag>master</tag>
33-
<connection>https://github.com/pig-mesh/multilevel-cache-spring-boot-starter</connection>
34-
<developerConnection>https://pig4cloud.com</developerConnection>
35-
<url>https://github.com/pig-mesh</url>
33+
<connection>https://gitee.wang/lengleng/pig</connection>
34+
<developerConnection>https://pigx.top</developerConnection>
35+
<url>https://gitee.wang/lengleng/pig.git</url>
3636
</scm>
3737

3838
<properties>
3939
<java.version>1.8</java.version>
4040
<mica.version>2.2.2</mica.version>
41-
<spring.checkstyle.plugin>0.0.31</spring.checkstyle.plugin>
41+
<spring.checkstyle.plugin>0.0.29</spring.checkstyle.plugin>
4242
</properties>
4343

4444
<dependencies>
@@ -70,7 +70,6 @@
7070
<optional>true</optional>
7171
</dependency>
7272

73-
<!-- 包含有 spring-boot-configuration-processor -->
7473
<dependency>
7574
<groupId>net.dreamlu</groupId>
7675
<artifactId>mica-auto</artifactId>

src/main/java/com/pig4cloud/plugin/cache/enums/CaffeineStrength.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
*/
88
@SuppressWarnings("JavadocReference")
99
public enum CaffeineStrength {
10-
/** 弱引用 */ WEAK,
11-
/** 软引用 */ SOFT
10+
11+
/** 弱引用 */
12+
WEAK,
13+
/** 软引用 */
14+
SOFT
15+
1216
}

src/main/java/com/pig4cloud/plugin/cache/support/RedisCaffeineCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public ValueWrapper putIfAbsent(Object key, Object value) {
114114
return toValueWrapper(prevValue);
115115
}
116116

117-
private void doPut(Object key,Object value){
117+
private void doPut(Object key, Object value) {
118118
Duration expire = getExpire();
119119
value = toStoreValue(value);
120120
if (!expire.isNegative()) {

src/main/java/com/pig4cloud/plugin/cache/support/RedisCaffeineCacheManager.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ public com.github.benmanes.caffeine.cache.Cache<Object, Object> caffeineCache()
6969
}
7070
if (cacheConfigProperties.getCaffeine().getKeyStrength() != null) {
7171
switch (cacheConfigProperties.getCaffeine().getKeyStrength()) {
72-
case WEAK:
73-
cacheBuilder.weakKeys();
74-
break;
75-
case SOFT:
76-
throw new UnsupportedOperationException("caffeine 不支持 key 软引用");
77-
default:
72+
case WEAK:
73+
cacheBuilder.weakKeys();
74+
break;
75+
case SOFT:
76+
throw new UnsupportedOperationException("caffeine 不支持 key 软引用");
77+
default:
7878
}
7979
}
8080
if (cacheConfigProperties.getCaffeine().getValueStrength() != null) {
8181
switch (cacheConfigProperties.getCaffeine().getValueStrength()) {
82-
case WEAK:
83-
cacheBuilder.weakValues();
84-
break;
85-
case SOFT:
86-
cacheBuilder.softValues();
87-
default:
82+
case WEAK:
83+
cacheBuilder.weakValues();
84+
break;
85+
case SOFT:
86+
cacheBuilder.softValues();
87+
default:
8888
}
8989
}
9090
return cacheBuilder.build();

0 commit comments

Comments
 (0)