Skip to content

Commit b3ec484

Browse files
committed
解决 SpringBoot 启动报错缺少 snakeyaml,部分类找不到等问题
1 parent bf4dae4 commit b3ec484

File tree

3 files changed

+270
-264
lines changed

3 files changed

+270
-264
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml

Lines changed: 61 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,26 @@
7676
<artifactId>apijson-router</artifactId>
7777
<version>2.0.0</version>
7878
</dependency>
79-
<dependency>
80-
<groupId>com.github.APIJSON</groupId>
81-
<artifactId>apijson-milvus</artifactId>
82-
<version>1.1.0</version>
83-
</dependency>
84-
<dependency>
85-
<groupId>com.github.APIJSON</groupId>
86-
<artifactId>apijson-influxdb</artifactId>
87-
<version>1.1.0</version>
88-
</dependency>
89-
<dependency>
90-
<groupId>com.github.APIJSON</groupId>
91-
<artifactId>apijson-mongodb</artifactId>
92-
<version>1.0.0</version>
93-
</dependency>
94-
<dependency>
95-
<groupId>com.github.APIJSON</groupId>
96-
<artifactId>apijson-cassandra</artifactId>
97-
<version>0.9.0</version>
98-
</dependency>
79+
<!-- <dependency>-->
80+
<!-- <groupId>com.github.APIJSON</groupId>-->
81+
<!-- <artifactId>apijson-milvus</artifactId>-->
82+
<!-- <version>1.1.0</version>-->
83+
<!-- </dependency>-->
84+
<!-- <dependency>-->
85+
<!-- <groupId>com.github.APIJSON</groupId>-->
86+
<!-- <artifactId>apijson-influxdb</artifactId>-->
87+
<!-- <version>1.1.0</version>-->
88+
<!-- </dependency>-->
89+
<!-- <dependency>-->
90+
<!-- <groupId>com.github.APIJSON</groupId>-->
91+
<!-- <artifactId>apijson-mongodb</artifactId>-->
92+
<!-- <version>1.0.0</version>-->
93+
<!-- </dependency>-->
94+
<!-- <dependency>-->
95+
<!-- <groupId>com.github.APIJSON</groupId>-->
96+
<!-- <artifactId>apijson-cassandra</artifactId>-->
97+
<!-- <version>0.9.0</version>-->
98+
<!-- </dependency>-->
9999
<!-- <dependency>-->
100100
<!-- <groupId>com.github.APIJSON</groupId>-->
101101
<!-- <artifactId>apijson-milvus</artifactId>-->
@@ -225,21 +225,27 @@
225225
<!-- </exclusions>-->
226226
<!-- </dependency>-->
227227
<!-- APIJSONBoot 需要用的 SpringBoot 框架,1.4.0 以上 -->
228+
<!-- <dependency>-->
229+
<!-- <groupId>org.datayoo.moql</groupId>-->
230+
<!-- <artifactId>moql-querier-milvus</artifactId>-->
231+
<!-- <version>1.0.0</version>-->
232+
<!-- </dependency>-->
233+
<!-- <dependency>-->
234+
<!-- <groupId>io.milvus</groupId>-->
235+
<!-- <artifactId>milvus-sdk-java</artifactId>-->
236+
<!-- <version>2.2.2</version>-->
237+
<!-- <exclusions>-->
238+
<!-- <exclusion>-->
239+
<!-- <groupId>org.apache.logging.log4j</groupId>-->
240+
<!-- <artifactId>log4j-slf4j-impl</artifactId>-->
241+
<!-- </exclusion>-->
242+
<!-- </exclusions>-->
243+
<!-- </dependency>-->
244+
228245
<dependency>
229-
<groupId>org.datayoo.moql</groupId>
230-
<artifactId>moql-querier-milvus</artifactId>
231-
<version>1.0.0</version>
232-
</dependency>
233-
<dependency>
234-
<groupId>io.milvus</groupId>
235-
<artifactId>milvus-sdk-java</artifactId>
236-
<version>2.2.2</version>
237-
<exclusions>
238-
<exclusion>
239-
<groupId>org.apache.logging.log4j</groupId>
240-
<artifactId>log4j-slf4j-impl</artifactId>
241-
</exclusion>
242-
</exclusions>
246+
<groupId>org.yaml</groupId>
247+
<artifactId>snakeyaml</artifactId>
248+
<version>2.2</version>
243249
</dependency>
244250

245251
<dependency>
@@ -266,29 +272,29 @@
266272
<!-- </dependency>-->
267273

268274
<!-- 需要用的 Druid 数据库连接池库,1.0.29 以上 -->
269-
<dependency>
270-
<groupId>com.alibaba</groupId>
271-
<artifactId>druid</artifactId>
272-
<version>1.2.9</version>
273-
</dependency>
275+
<!-- <dependency>-->
276+
<!-- <groupId>com.alibaba</groupId>-->
277+
<!-- <artifactId>druid</artifactId>-->
278+
<!-- <version>1.2.9</version>-->
279+
<!-- </dependency>-->
274280

275-
<dependency>
276-
<groupId>redis.clients</groupId>
277-
<artifactId>jedis</artifactId>
278-
<version>3.9.0</version>
279-
</dependency>
281+
<!-- <dependency>-->
282+
<!-- <groupId>redis.clients</groupId>-->
283+
<!-- <artifactId>jedis</artifactId>-->
284+
<!-- <version>3.9.0</version>-->
285+
<!-- </dependency>-->
280286

281-
<dependency>
282-
<groupId>org.springframework.data</groupId>
283-
<artifactId>spring-data-redis</artifactId>
284-
<version>3.3.0</version>
285-
<exclusions>
286-
<exclusion>
287-
<groupId>redis.clients</groupId>
288-
<artifactId>jedis</artifactId>
289-
</exclusion>
290-
</exclusions>
291-
</dependency>
287+
<!-- <dependency>-->
288+
<!-- <groupId>org.springframework.data</groupId>-->
289+
<!-- <artifactId>spring-data-redis</artifactId>-->
290+
<!-- <version>3.2.5</version>-->
291+
<!-- <exclusions>-->
292+
<!-- <exclusion>-->
293+
<!-- <groupId>redis.clients</groupId>-->
294+
<!-- <artifactId>jedis</artifactId>-->
295+
<!-- </exclusion>-->
296+
<!-- </exclusions>-->
297+
<!-- </dependency>-->
292298
<!-- <dependency>-->
293299
<!-- <groupId>org.datayoo.moql</groupId>-->
294300
<!-- <artifactId>moql-meta</artifactId>-->

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ public static ApplicationContext getApplicationContext() {
8383
public static void main(String[] args) throws Exception {
8484
APPLICATION_CONTEXT = SpringApplication.run(DemoApplication.class, args);
8585

86-
try {
87-
DemoSQLExecutor.REDIS_TEMPLATE.discard();
88-
} catch (Throwable e) {
89-
e.printStackTrace();
90-
}
86+
// try {
87+
// DemoSQLExecutor.REDIS_TEMPLATE.discard();
88+
// } catch (Throwable e) {
89+
// e.printStackTrace();
90+
// }
9191

9292
// FIXME 不要开放给项目组后端之外的任何人使用 UnitAuto(强制登录鉴权)!!!如果不需要单元测试则移除相关代码或 unitauto.Log.DEBUG = false;
9393
// 上线生产环境前改为 false,可不输出 APIJSONORM 的日志 以及 SQLException 的原始(敏感)信息

0 commit comments

Comments
 (0)