SpringCloud microservice pitfall record
consul
exception is : Consul service ids must not be empty, must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphen:null
The microservice cannot be started and an error has been reported. The online modification suggestions are generally to modify the service-name and instance-id of the configuration file, which are still not easy to use after modification.
Later, the solution was to change the springcloud version
2. The error is as follows
: Error creating bean with name ‘configurationPropertiesBeans’ defined in class path resource [org/springframework/cloud/autoconfigure/]: Post-processing of merged bean definition failed; nested exception is : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
Caused by: : Failed to introspect Class [] from ClassLoader [$AppClassLoader@18b4aac2]
Caused by: : org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
Caused by: :
reason
Springboot version and Spring cloud version do not match
Later versions use 2.2.5 and Hoxton.SR3 respectively to solve the problem.
<parent> <groupId></groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.</version> </parent>
<properties> <>UTF-8</> <>UTF-8</> <>1.8</> <>1.8</> <>1.8</> <>Hoxton.SR3</> </properties>
Summarize
The above is personal experience. I hope you can give you a reference and I hope you can support me more.