java - Spring启动问题-java.lang.IllegalArgumentException : Value must only contain valid chars

标签 java spring-boot spring-cloud

将 Spring Cloud(Finchley.M8) 依赖添加到 Spring Boot(2.0.6.RELEASE) 项目后,出现异常:

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)

最佳答案

我在启动 springCloudConfigServer 项目时遇到了同样的异常。

根本原因是 application.properties 中以下属性的值不正确(拼写错误)

之前: management.endpoints.web.exposure.include=bus=refresh

我将其更改如下,我的项目成功启动 management.endpoints.web.exposure.include=总线刷新

关于java - Spring启动问题-java.lang.IllegalArgumentException : Value must only contain valid chars,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54533337/

相关文章:

java - 内存效率: HashMap versus Array

Java 小程序 : Reverse Engineering HTTP Calls

java - 如何从 apk 中排除特定资源文件夹

java - Spring Cloud - 将服务绑定(bind)在一起

java - 内存分配给从 servlet 执行的主类?

java - 在 Spring Boot 中使用 JSP 中的自定义标记文件

java - Eclipse STS Gradle 错误 - java.lang.NoClassDefFoundError : org/springframework/boot/SpringApplication

java - Vaadin EntityManager NullReferenceException

spring-cloud - Spring Cloud Data Flow Grafana Prometheus 未显示流数据

spring-boot - Spring Boot + Eureka Server + Hystrix with Turbine : empty turbine. 流