Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit 9d5f48d

Browse files
committed
🔖 发布1.1.2版本
1 parent aea88f8 commit 9d5f48d

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
<dependency>
6868
<groupId>com.opcooc</groupId>
6969
<artifactId>opcooc-storage-spring-boot-starter</artifactId>
70-
<version>1.1.1</version>
70+
<version>1.1.2</version>
7171
</dependency>
7272
```
7373
- Gradle
7474
```groovy
75-
implementation 'com.opcooc:opcooc-storage-spring-boot-starter:1.1.1'
75+
implementation 'com.opcooc:opcooc-storage-spring-boot-starter:1.1.2'
7676
```
7777

7878
## 添加配置,在 `application.yml` 中添加配置信息

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
encoding=UTF-8
33

44
#project version
5-
opcoocVersion=1.1.1
5+
opcoocVersion=1.1.2
66

77
sonatypeUsername=*
88
sonatypePassword=*

src/main/java/com/opcooc/storage/holder/ClientDriverHolder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@Setter
3535
public class ClientDriverHolder {
3636

37-
public ClientDriver getClientDriver(ClientDriverProperty property) {
37+
public static ClientDriver getClientDriver(ClientDriverProperty property) {
3838

3939
if (property.getCustomClient() != null) {
4040
//实例化自定义 ClientDriver
@@ -54,7 +54,7 @@ public ClientDriver getClientDriver(ClientDriverProperty property) {
5454
return getDefaultS3ClientDriver(property);
5555
}
5656

57-
public ClientDriver getCustomizeClientDriver(ClientDriverProperty property) {
57+
public static ClientDriver getCustomizeClientDriver(ClientDriverProperty property) {
5858
// 校验配置合法性
5959
property.preCheck();
6060
Client client = StorageUtil.instantiateClass(property.getCustomClient(), property);
@@ -63,7 +63,7 @@ public ClientDriver getCustomizeClientDriver(ClientDriverProperty property) {
6363
return driver;
6464
}
6565

66-
public ClientDriver getDefaultS3ClientDriver(ClientDriverProperty property) {
66+
public static ClientDriver getDefaultS3ClientDriver(ClientDriverProperty property) {
6767
// 校验配置合法性
6868
property.preCheck();
6969
S3Client client = new S3Client(property);

src/main/java/com/opcooc/storage/provider/AbstractClientDriverProvider.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import java.util.HashMap;
1919
import java.util.Map;
2020

21-
import org.springframework.beans.factory.annotation.Autowired;
2221
import org.springframework.util.ObjectUtils;
2322

2423
import com.opcooc.storage.drivers.ClientDriver;
@@ -33,16 +32,13 @@
3332
*/
3433
public abstract class AbstractClientDriverProvider implements ClientDriverProvider {
3534

36-
@Autowired
37-
private ClientDriverHolder clientDriverHolder;
38-
3935
protected Map<String, ClientDriver> createClientDriverMap(Map<String, ClientDriverProperty> clientDriverMap) {
4036

4137
Map<String, ClientDriver> map = new HashMap<>(clientDriverMap.size() * 2);
4238
for (Map.Entry<String, ClientDriverProperty> item : clientDriverMap.entrySet()) {
4339
ClientDriverProperty clientDriverProperty = item.getValue();
4440
String driverName = clientDriverProperty.getDriver();
45-
ClientDriver driver = clientDriverHolder.getClientDriver(clientDriverProperty);
41+
ClientDriver driver = ClientDriverHolder.getClientDriver(clientDriverProperty);
4642
if (ObjectUtils.isEmpty(driverName)) {
4743
driverName = item.getKey();
4844
}

src/main/java/com/opcooc/storage/spring/boot/autoconfigure/DynamicStorageAutoConfiguration.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import com.opcooc.storage.aop.DynamicClientAnnotationInterceptor;
3232
import com.opcooc.storage.drivers.ClientDriver;
3333
import com.opcooc.storage.drivers.DynamicRoutingClientDriver;
34-
import com.opcooc.storage.holder.ClientDriverHolder;
3534
import com.opcooc.storage.processor.OsHeaderProcessor;
3635
import com.opcooc.storage.processor.OsProcessor;
3736
import com.opcooc.storage.processor.OsSessionProcessor;
@@ -41,7 +40,6 @@
4140
import com.opcooc.storage.support.ObjectConverter;
4241

4342
import lombok.RequiredArgsConstructor;
44-
import lombok.extern.slf4j.Slf4j;
4543

4644
/**
4745
* 自动IOC注入类
@@ -63,12 +61,6 @@ public YmlClientDriverProvider ymlClientDriverProvider() {
6361
return new YmlClientDriverProvider(properties.getDriver());
6462
}
6563

66-
@Bean
67-
@ConditionalOnMissingBean
68-
public ClientDriverHolder clientDriverHolder() {
69-
return new ClientDriverHolder();
70-
}
71-
7264
@Bean
7365
@ConditionalOnMissingBean
7466
public ClientDriver clientDriver() {

0 commit comments

Comments
 (0)