Skip to content

Commit 333cd15

Browse files
committed
修复httpclient5版本过低导致启动失败问题
1 parent aeb8c4d commit 333cd15

1 file changed

Lines changed: 44 additions & 13 deletions

File tree

pom.xml

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<artifactId>opensabre-base-dependencies</artifactId>
1616
<groupId>io.github.opensabre</groupId>
17-
<version>0.1.0</version>
17+
<version>0.1.1</version>
1818
</parent>
1919

2020
<properties>
@@ -37,6 +37,11 @@
3737
<groupId>io.github.opensabre</groupId>
3838
<artifactId>opensabre-starter-rpc</artifactId>
3939
</dependency>
40+
<dependency>
41+
<groupId>org.apache.httpcomponents.client5</groupId>
42+
<artifactId>httpclient5</artifactId>
43+
<version>5.4.1</version>
44+
</dependency>
4045
<dependency>
4146
<groupId>io.github.opensabre</groupId>
4247
<artifactId>opensabre-starter-cache</artifactId>
@@ -99,26 +104,52 @@
99104
<plugin>
100105
<groupId>com.google.cloud.tools</groupId>
101106
<artifactId>jib-maven-plugin</artifactId>
102-
<version>3.4.6</version>
107+
<dependencies>
108+
<!-- 添加所有权扩展 -->
109+
<dependency>
110+
<groupId>com.google.cloud.tools</groupId>
111+
<artifactId>jib-ownership-extension-maven</artifactId>
112+
<version>0.1.0</version>
113+
</dependency>
114+
</dependencies>
103115
<configuration>
116+
<pluginExtensions>
117+
<pluginExtension>
118+
<implementation>com.google.cloud.tools.jib.maven.extension.ownership.JibOwnershipExtension</implementation>
119+
<configuration implementation="com.google.cloud.tools.jib.maven.extension.ownership.Configuration">
120+
<rules>
121+
<rule>
122+
<glob>/app/logs/**</glob>
123+
<ownership>1001</ownership>
124+
</rule>
125+
</rules>
126+
</configuration>
127+
</pluginExtension>
128+
</pluginExtensions>
104129
<!-- 基础镜像 -->
105130
<from>
106131
<image>docker.1ms.run/eclipse-temurin:21-jre-alpine</image>
107132
</from>
108-
<!-- 目标镜像 -->
109133
<to>
110-
<image>opensabre/${project.artifactId}:${project.version}</image>
134+
<image>${REGISTRY_URL}/${project.artifactId}:${project.version}</image>
135+
<auth>
136+
<username>${secret.id}</username>
137+
<password>${secret.key}</password>
138+
</auth>
139+
<tags>
140+
<tag>latest</tag>
141+
<tag>${project.version}</tag>
142+
</tags>
111143
</to>
112-
<!-- 容器配置 -->
113144
<container>
114-
<user>1000</user>
115-
<workingDirectory>/app</workingDirectory>
116-
<mainClass>io.github.opensabre.authorization.Oauth2AuthorizationApplication</mainClass>
117-
<ports>
118-
<port>8000</port>
119-
</ports>
120-
<jvmFlags>-XX:+UseContainerSupport</jvmFlags>
121-
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
145+
<volumes>
146+
<volume>/app/logs</volume>
147+
</volumes>
148+
<!-- 设置环境变量 -->
149+
<environment>
150+
<!-- 设置时区 -->
151+
<TZ>Asia/Shanghai</TZ>
152+
</environment>
122153
</container>
123154
</configuration>
124155
</plugin>

0 commit comments

Comments
 (0)