Spring boot error:java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

后端 未结 9 971
小蘑菇
小蘑菇 2020-12-05 17:59

I want to use spring boot to start my application ,but after i add some relative jar at pom.xml,it return this error:and i thank may be it caused by some conflict jars?

9条回答
  •  抹茶落季
    2020-12-05 18:08

    The solution can vary based on actual incompatibility root cause. The best way how to investigate such the issue is to follow this line:

    Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    

    and put breakpoint into constructor of class 'TypeNotPresentExceptionProxy' (there is only one).

    After execution in debug mode you should see what exactly is wrong and based on your findings you can decide what to do (add dependency, exclude autoconfig, ...)

    In my specific case the breakpoint revealed this:

    java.lang.ClassNotFoundException: org.springframework.integration.config.IntegrationManagementConfigurer
    

    As the solution I decided to exclude 'IntegrationAutoConfiguration' like this:

    @SpringBootApplication(exclude = IntegrationAutoConfiguration.class)
    

提交回复
热议问题