启动找不到类型转换器

提问 1 1464
安i
安i 2019-09-29
版本:renren-fast 开发环境:
2019-09-29 13:41:07.851 INFO 8128 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7dc0f706: startup date [Sun Sep 29 13:41:07 CST 2019]; root of context hierarchy 2019-09-29 13:41:10.606 ERROR 8128 --- [ main] o.s.b.b.PropertiesConfigurationFactory : Properties configuration failed validation 2019-09-29 13:41:10.607 ERROR 8128 --- [ main] o.s.b.b.PropertiesConfigurationFactory : Field error in object 'server' on field 'connectionTimeout': rejected value [5000ms]; codes [typeMismatch.server.connectionTimeout,typeMismatch.connectionTimeout,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [server.connectionTimeout,connectionTimeout]; arguments []; default message [connectionTimeout]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'connectionTimeout'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]] 2019-09-29 13:41:10.611 WARN 8128 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverProperties': Could not bind properties to ServerProperties (prefix=server, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors Field error in object 'server' on field 'connectionTimeout': rejected value [5000ms]; codes [typeMismatch.server.connectionTimeout,typeMismatch.connectionTimeout,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [server.connectionTimeout,connectionTimeout]; arguments []; default message [connectionTimeout]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'connectionTimeout'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer]] 2019-09-29 13:41:10.622 INFO 8128 --- [ main] utoConfigurationReportLoggingInitializer : Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2019-09-29 13:41:10.627 ERROR 8128 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Binding to target org.springframework.boot.autoconfigure.web.ServerProperties@1d3e6d34 failed: Property: server.connectionTimeout Value: 5000ms Reason: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'connectionTimeout'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.lang.Integer] Action: Update your application's configuration
回帖
  • 修改过代码吗,本地测试,没有报错信息
    0 回复