如何从应用程序启动中删除Spring Data CustomConversions警告?

问题描述 投票:0回答:1

我有一个具有以下Spring依赖项的应用程序:

starterBase    : 'org.springframework.boot:spring-boot-starter:2.2.1.RELEASE',
starterActuator: 'org.springframework.boot:spring-boot-starter-actuator:2.2.1.RELEASE',
starterJpa     : 'org.springframework.boot:spring-boot-starter-data-jpa:2.2.1.RELEASE',
starterTest    : 'org.springframework.boot:spring-boot-starter-test:2.2.1.RELEASE',
starterWeb     : 'org.springframework.boot:spring-boot-starter-web:2.2.1.RELEASE',
elasticsearch  : 'org.springframework.boot:spring-boot-starter-data-elasticsearch:2.2.1.RELEASE'

添加弹性搜索依赖项时,启动应用程序时出现以下警告:

WARN  [main] o.s.data.convert.CustomConversions.register - Registering converter from class org.springframework.data.geo.Point to interface java.util.Map as writing converter although it doesn't convert to a store-supported type! You might wanna check you annotation setup at the converter implementation.
WARN  [main] o.s.data.convert.CustomConversions.register - Registering converter from interface java.util.Map to class org.springframework.data.geo.Point as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.
WARN  [main] o.s.data.convert.CustomConversions.register - Registering converter from class org.springframework.data.elasticsearch.core.geo.GeoPoint to interface java.util.Map as writing converter although it doesn't convert to a store-supported type! You might wanna check you annotation setup at the converter implementation.
WARN  [main] o.s.data.convert.CustomConversions.register - Registering converter from interface java.util.Map to class org.springframework.data.elasticsearch.core.geo.GeoPoint as reading converter although it doesn't convert from a store-supported type! You might wanna check you annotation setup at the converter implementation.

我调试了代码,并在CustomConversions.java中的spring-data-commons:2.2.1-RELEASE中,在第196行有一个名为'register'的私有方法,它的javadoc提到了Mongo类型,它是奇怪,因为我们没有使用Mongo。该Mongo参考正确吗?

但是主要问题是,有什么方法可以避免/消除这些警告?

spring-boot spring-data spring-data-elasticsearch
1个回答
0
投票

此代码已于2017年4月重构为Spring数据公用区,并且注释是从原始位置复制而未改编。因此,这里没有mongo专用内容。

至于警告,您目前所能做的就是忽略它们,我们将检查是否需要这些警告。

© www.soinside.com 2019 - 2024. All rights reserved.