我正在使用Spring Boot 1.4.1,使用spring boot gradle插件,因此它使用的是spring framework 4.3.3。加载我的应用程序,我收到了这个错误,它让我疯了:
[timestamp=23:49:24.983] [thread="main"] [session="undefined"] [request="undefined"] [level=WARN ] [logger=o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext] [class=org.springframework.context.support.AbstractApplicationContext] [line=549]
- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'heapdumpMvcEndpoint': Could not bind properties to HeapdumpMvcEndpoint (prefix=endpoints.heapdump, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint@29897daf failed:
Property: endpoints.heapdump.path
Value: null
Reason: may not be null
Action:
Update your application's configuration
我不知道我的代码的哪些部分向你们展示,这个错误吓坏了我。如果有人有任何想法,我可以开始发送我的构建文件,我的Application类等。
错误说明了一个名为'heapdumpMvcEndpoint'的bean和一个名为endpoints.heapdump.path的属性。我尝试将'endpoints.heapdump.path'添加到我的应用程序属性中,但它不起作用。