gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 13:57:08 26 4
gpt4 key购买 nike

我有一个具有以下 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'

在我添加elasticsearch依赖的那一刻,当我启动应用程序时出现以下警告:
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'的私有(private)方法,它的javadoc提到了Mongo类型,很奇怪,因为我们没有使用 Mongo。这个 Mongo 引用正确吗?

但主要问题是,有没有办法避免/删除这些警告?

最佳答案

我通过添加到我的 application.yml 来修复它:

logging.level.org.springframework.data.convert.CustomConversions: ERROR

关于spring-boot - 如何从应用程序启动中删除 Spring Data CustomConversions 警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60001034/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com