Skip to content

Commit 30f42b2

Browse files
author
lbw
committed
🔖 Releasing / Version tags. 3.0.0 适配springboot 3.0 体系
1 parent ef3c86e commit 30f42b2

File tree

4 files changed

+97
-19
lines changed

4 files changed

+97
-19
lines changed

.github/workflows/oss-deploy.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,16 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v3
14-
- name: Set up JDK 11
14+
- name: Set up JDK 17
1515
uses: actions/setup-java@v2
1616
with:
17-
java-version: '11'
17+
java-version: '17'
1818
distribution: 'adopt'
1919
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-
2920
- name: Setup Maven Central
3021
uses: actions/setup-java@v3
3122
with: # overwrite settings.xml
32-
java-version: '11'
23+
java-version: '17'
3324
distribution: 'adopt'
3425
server-id: sonatype
3526
server-username: OSSRH_USERNAME

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@
1212

1313
## spring boot starter依赖
1414

15+
16+
| 版本 | 支持 |
17+
|-------|--|
18+
| 3.0.0 | 适配 SpringBoot3.x |
19+
| 1.0.5 | 适配 SpringBoot2.x |
20+
1521
- 方便在 web 环境下使用 `oss` ,已上传至 maven 仓库
1622
```xml
1723
<dependency>
1824
<groupId>com.pig4cloud.plugin</groupId>
1925
<artifactId>oss-spring-boot-starter</artifactId>
20-
<version>1.0.5</version>
26+
<version>${lastVersion}</version>
2127
</dependency>
2228
```
2329

pom.xml

Lines changed: 85 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
</parent>
1111
<groupId>com.pig4cloud.plugin</groupId>
1212
<artifactId>oss-spring-boot-starter</artifactId>
13-
<version>1.1.0-SNAPSHOT</version>
13+
<version>3.0.0-SNAPSHOT</version>
1414
<name>oss-spring-boot-starter</name>
1515
<description>兼容S3 协议的通用文件存储工具类</description>
1616

1717
<properties>
1818
<java.version>17</java.version>
1919
<aws.version>1.12.261</aws.version>
20-
<mica.auto.version>2.2.2</mica.auto.version>
20+
<mica.auto.version>3.0.0</mica.auto.version>
2121
<swagger.version>1.5.22</swagger.version>
2222
<swagger.v3.version>2.1.10</swagger.v3.version>
2323
<spring.checkstyle.plugin>0.0.29</spring.checkstyle.plugin>
@@ -97,9 +97,10 @@
9797
</plugin>
9898
</plugins>
9999
</build>
100+
100101
<profiles>
101102
<profile>
102-
<id>release</id>
103+
<id>snapshot</id>
103104
<build>
104105
<plugins>
105106
<!-- Source -->
@@ -120,14 +121,14 @@
120121
<plugin>
121122
<groupId>org.apache.maven.plugins</groupId>
122123
<artifactId>maven-javadoc-plugin</artifactId>
123-
<version>2.9.1</version>
124+
<version>3.3.2</version>
124125
<configuration>
125126
<show>private</show>
126127
<nohelp>true</nohelp>
127128
<charset>UTF-8</charset>
128129
<encoding>UTF-8</encoding>
129130
<docencoding>UTF-8</docencoding>
130-
<additionalparam>-Xdoclint:none</additionalparam>
131+
<doclint>none</doclint>
131132
<detectJavaApiLink>false</detectJavaApiLink>
132133
</configuration>
133134
<executions>
@@ -163,7 +164,7 @@
163164
<plugin>
164165
<groupId>org.sonatype.plugins</groupId>
165166
<artifactId>nexus-staging-maven-plugin</artifactId>
166-
<version>1.6.8</version>
167+
<version>1.6.13</version>
167168
<extensions>true</extensions>
168169
<configuration>
169170
<serverId>sonatype</serverId>
@@ -180,6 +181,84 @@
180181
https://oss.sonatype.org/content/repositories/snapshots/
181182
</url>
182183
</snapshotRepository>
184+
</distributionManagement>
185+
</profile>
186+
<profile>
187+
<id>release</id>
188+
<build>
189+
<plugins>
190+
<!-- Source -->
191+
<plugin>
192+
<groupId>org.apache.maven.plugins</groupId>
193+
<artifactId>maven-source-plugin</artifactId>
194+
<version>2.2.1</version>
195+
<executions>
196+
<execution>
197+
<phase>package</phase>
198+
<goals>
199+
<goal>jar-no-fork</goal>
200+
</goals>
201+
</execution>
202+
</executions>
203+
</plugin>
204+
<!-- Javadoc -->
205+
<plugin>
206+
<groupId>org.apache.maven.plugins</groupId>
207+
<artifactId>maven-javadoc-plugin</artifactId>
208+
<version>3.3.2</version>
209+
<configuration>
210+
<show>private</show>
211+
<nohelp>true</nohelp>
212+
<charset>UTF-8</charset>
213+
<encoding>UTF-8</encoding>
214+
<docencoding>UTF-8</docencoding>
215+
<doclint>none</doclint>
216+
<detectJavaApiLink>false</detectJavaApiLink>
217+
</configuration>
218+
<executions>
219+
<execution>
220+
<phase>package</phase>
221+
<goals>
222+
<goal>jar</goal>
223+
</goals>
224+
</execution>
225+
</executions>
226+
</plugin>
227+
<!-- GPG -->
228+
<plugin>
229+
<groupId>org.apache.maven.plugins</groupId>
230+
<artifactId>maven-gpg-plugin</artifactId>
231+
<version>3.0.1</version>
232+
<executions>
233+
<execution>
234+
<id>sign-artifacts</id>
235+
<phase>verify</phase>
236+
<goals>
237+
<goal>sign</goal>
238+
</goals>
239+
</execution>
240+
</executions>
241+
<configuration>
242+
<gpgArguments>
243+
<arg>--pinentry-mode</arg>
244+
<arg>loopback</arg>
245+
</gpgArguments>
246+
</configuration>
247+
</plugin>
248+
<plugin>
249+
<groupId>org.sonatype.plugins</groupId>
250+
<artifactId>nexus-staging-maven-plugin</artifactId>
251+
<version>1.6.13</version>
252+
<extensions>true</extensions>
253+
<configuration>
254+
<serverId>sonatype</serverId>
255+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
256+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
257+
</configuration>
258+
</plugin>
259+
</plugins>
260+
</build>
261+
<distributionManagement>
183262
<repository>
184263
<id>sonatype</id>
185264
<url>

src/main/java/com/pig4cloud/plugin/oss/OssAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import com.pig4cloud.plugin.oss.http.OssEndpoint;
2121
import com.pig4cloud.plugin.oss.service.OssTemplate;
22+
import org.springframework.boot.autoconfigure.AutoConfiguration;
2223
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2324
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
2425
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
@@ -33,6 +34,7 @@
3334
* @author 858695266
3435
* @author L.cm
3536
*/
37+
@AutoConfiguration
3638
@Configuration(proxyBeanMethods = false)
3739
@EnableConfigurationProperties({ OssProperties.class })
3840
public class OssAutoConfiguration {

0 commit comments

Comments
 (0)