mirror of
https://gitee.com/ChinaLym/shoulder-platform.git
synced 2025-12-30 02:52:27 +00:00
Spring Boot 3.2.x
- sca、shoulder 升级 - nacos 等焕然一新,2.x,去掉 fastjson、guava依赖 - maven 插件升级 - minio 升级
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
|
||||
<artifactId>shoulder-platform-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>shoulder platform 的通用父类,管理了平台的技术选型和通用配置</description>
|
||||
|
||||
<url>https://github.com/ChinaLym/shoulder-platform</url>
|
||||
<properties>
|
||||
@@ -55,28 +57,27 @@
|
||||
<dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
|
||||
<docker.image.prefix>shoulder</docker.image.prefix>
|
||||
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
|
||||
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
|
||||
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
|
||||
<maven-jar-plugin.version>3.4.1</maven-jar-plugin.version>
|
||||
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
|
||||
|
||||
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
|
||||
<findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version>
|
||||
<!-- 更新于2015-->
|
||||
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
|
||||
<versions-maven-plugin.version>2.7</versions-maven-plugin.version>
|
||||
<license-maven-plugin.version>2.2.0</license-maven-plugin.version>
|
||||
<versions-maven-plugin.version>2.16.2</versions-maven-plugin.version>
|
||||
<license-maven-plugin.version>4.5.0</license-maven-plugin.version>
|
||||
<git-commit-id-plugin.version>6.0.0</git-commit-id-plugin.version>
|
||||
<sonar-maven-plugin.version>3.10.0.2594</sonar-maven-plugin.version>
|
||||
|
||||
<shoulder-maven-plugin.version>1.1</shoulder-maven-plugin.version>
|
||||
<shoulder-maven-plugin.version>1.2.1</shoulder-maven-plugin.version>
|
||||
<shoulder-framework.errcode-prefix>0x0000</shoulder-framework.errcode-prefix>
|
||||
|
||||
<springdoc-openapi-maven-plugin.version>0.3</springdoc-openapi-maven-plugin.version>
|
||||
<!-- <springdoc-openapi-maven-plugin.version>0.3</springdoc-openapi-maven-plugin.version>-->
|
||||
|
||||
</properties>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>shoulder platform 的通用父类,管理了平台的技术选型和通用配置</description>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>lym</name>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<artifactId>minio</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
@@ -32,6 +33,11 @@
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
<version>7.1.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -32,10 +32,11 @@ public class MinioAutoConfiguration {
|
||||
* @throws InvalidPortException port 错误
|
||||
*/
|
||||
@Bean
|
||||
public MinioClient minioClient() throws InvalidPortException, InvalidEndpointException {
|
||||
return new MinioClient(minioProperties.getEndpoint(), minioProperties.getPort(),
|
||||
minioProperties.getAccessKey(), minioProperties.getSecretKey(),
|
||||
minioProperties.getRegion(), minioProperties.isSecure()
|
||||
);
|
||||
public MinioClient minioClient() {
|
||||
return MinioClient.builder()
|
||||
.region(minioProperties.getRegion())
|
||||
.endpoint(minioProperties.getEndpoint())
|
||||
.credentials(minioProperties.getAccessKey(), minioProperties.getSecretKey())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,9 @@ public class MinioProperties {
|
||||
*/
|
||||
private Boolean enable = Boolean.TRUE;
|
||||
/**
|
||||
* minio Server 主机名或IP地址
|
||||
* minio Server http 地址,注意 minio8 后 endpoint 是 url 而非 host
|
||||
*/
|
||||
private String endpoint = "127.0.0.1";
|
||||
/**
|
||||
* 端口号
|
||||
*/
|
||||
private int port = 9000;
|
||||
private String endpoint = "http://127.0.0.1:9000";
|
||||
/**
|
||||
* ak 类似于用户ID,用于唯一标识你的账户
|
||||
*/
|
||||
@@ -34,10 +30,6 @@ public class MinioProperties {
|
||||
* 设置该值将覆盖自动发现存储桶region。(可选)
|
||||
*/
|
||||
private String region;
|
||||
/**
|
||||
* 使用 ssl
|
||||
*/
|
||||
private boolean secure = false;
|
||||
|
||||
public Boolean getEnable() {
|
||||
return enable;
|
||||
@@ -55,14 +47,6 @@ public class MinioProperties {
|
||||
this.endpoint = endpoint;
|
||||
}
|
||||
|
||||
public int getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(int port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getAccessKey() {
|
||||
return accessKey;
|
||||
}
|
||||
@@ -86,12 +70,4 @@ public class MinioProperties {
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public boolean isSecure() {
|
||||
return secure;
|
||||
}
|
||||
|
||||
public void setSecure(boolean secure) {
|
||||
this.secure = secure;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user