Reputation: 371
After adding Spring Cloud(Finchley.M8) dependency to Spring Boot(2.0.6.RELEASE) project, got an exception:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is java.lang.IllegalArgumentException: Value must only contain valid chars
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:583)
... 23 common frames omitted
Caused by: java.lang.IllegalArgumentException: Value must only contain valid chars
at org.springframework.util.Assert.isTrue(Assert.java:116)
at org.springframework.boot.actuate.endpoint.EndpointId.<init>(EndpointId.java:44)
at org.springframework.boot.actuate.endpoint.EndpointId.of(EndpointId.java:102)
at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer$EndpointBean.<init>(EndpointDiscoverer.java:471)
Upvotes: 2
Views: 9658
Reputation: 21
I had same exception while starting springCloudConfigServer project.
Root cause was incorrect value for the below property in application.properties (Typo mistake)
Before: management.endpoints.web.exposure.include=bus=refresh
I changed it like below and my project started successfully management.endpoints.web.exposure.include=bus-refresh
Upvotes: 2
Reputation: 73
For Me also Getting same Problem. Reason for me is in application.yml file I used / symbol for endpoint.
management:
endpoints:
web:
exposure:
include: hystrix.stream
Upvotes: 1
Reputation: 371
After some investigation time, it appears that I should use a different version of Spring Cloud.
I changed from Finchley.M8 to Finchley.SR2 and everything starts working fine.
Spring Cloud + Spring Boot 2.0.x compatibility notes: https://github.com/spring-projects/spring-cloud/wiki/spring-cloud-finchley-release-notes
Upvotes: 0