spring-projects / spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.
https://spring.io/projects/spring-boot
Apache License 2.0
75.18k stars 40.68k forks source link

Spring Boot incompatibility: starter-web + actuator + cloud-consul #14946

Closed Neikius closed 6 years ago

Neikius commented 6 years ago

When including the aforementioned libs in 1 project there will be an error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

Attached a minimal mvn app that produces this. This is a runtime problem: mvn spring-boot:run produces it. springbug.zip

bclozel commented 6 years ago

Could you raise that against the Spring Cloud Consul project please? It seems the incompatibility is coming from spring-cloud-starter-consul-discovery and Spring Boot is not maintaining that.

I've tested against the latest Finchley.SR1 version and I'm getting the same exception.

Thanks!

Neikius commented 6 years ago

Thanks for the pointer, will report there. I have to point out the spring project structure is unfathomable to an outsider.