Spring boot启动消除警告

此博客收集项目启动涉及到的警告知识:

  1. s.d.s.w.r.p.ParameterDataTypeReader : Trying to infer dataType org.springframework.web.multipart.MultipartFile[]

意思是:扫描接口时发现使用了MultipartFile类型的数组进行接收,不是Spring 标准的类型,可以使用单独的类进行封装,也可以使用 String 进行接收,业务中使用 Convert.toLongArray() 进行转数组(我这里报的是MultipartFile类型的,没有对应的转换方法,所以使用的bean解决的,Convert.toLongArray()的前提是在接收Long类型的数组时

  1. Version mismatch in between Elasticsearch Client and Cluster: 7.6.2 - 7.5.0

  2. 2020-12-24 16:13:15.236 [restartedMain] WARN [crm,dev,172.16.0.195] [23145] c.c.c.w.s.c.DynamicSecurityFilter : Could not validate configuration attributes as the SecurityMetadataSource did not return any attributes from getAllConfigAttributes() 2020-12-24 16:13:16.186 [restartedMain] WARN [crm,dev,172.16.0.195] [23145] o.s.data.convert.CustomConversions : 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 want to check your annotation setup at the converter implementation. 2020-12-24 16:13:16.186 [restartedMain] WARN [crm,dev,172.16.0.195] [23145] o.s.data.convert.CustomConversions : 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 want to check your annotation setup at the converter implementation. 2020-12-24 16:13:16.186 [restartedMain] WARN [crm,dev,172.16.0.195] [23145] o.s.data.convert.CustomConversions : 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 want to check your annotation setup at the converter implementation. 2020-12-24 16:13:16.186 [restartedMain] WARN [crm,dev,172.16.0.195] [23145] o.s.data.convert.CustomConversions : 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 want to check your annotation setup at the converter implementation.

解决办法:
在yml文件中加入配置:

logging:
  level:
    root: INFO
    org.springframework.data.convert.CustomConversions: ERROR
  1. No URLs will be polled as dynamic configuration sources.
    spring boot整合eureka时缺少配置

解决办法:在src/main/resources下添加空的config.properties

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
Spring Boot是一个用于快速构建独立的、基于Spring框架的Java应用程序的开发框架。它简化了Spring应用程序的配置和部署过程,提供了一种约定大于配置的方式来开发应用程序。 Spring Boot启动过程可以分为以下几个步骤: 1. 创建Spring Boot应用程序:首先,需要创建一个基于Spring Boot的Java项目。可以使用Spring Initializr来生成一个基本的项目结构,也可以手动创建一个Maven或Gradle项目,并添加相应的依赖。 2. 配置应用程序:在创建好的项目中,可以通过配置文件(application.properties或application.yml)来配置应用程序的属性,如端口号、数据库连接等。 3. 编写应用程序代码:根据业务需求,编写相应的Java类和方法。可以使用Spring Boot提供的注解和组件来简化开发过程,如@Controller、@Service、@Repository等。 4. 启动应用程序:在应用程序的入口类中,使用@SpringBootApplication注解标记该类为Spring Boot应用程序的入口点。然后,通过调用SpringApplication类的静态run()方法来启动应用程序。 5. 运行应用程序:启动应用程序后,Spring Boot会自动扫描并加载所有的组件和配置,并根据配置进行初始化。应用程序会监听指定的端口,等待客户端请求。 6. 处理请求:当有客户端请求到达时,Spring Boot会根据请求的URL和方法映射,调用相应的控制器方法进行处理。控制器方法可以返回数据或者跳转到指定的页面。 7. 关闭应用程序:当需要关闭应用程序时,可以通过调用SpringApplication类的静态exit()方法来优雅地关闭应用程序。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值