程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException?

开发过程中遇到Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException的问题如何解决?下面主要结合日常开发的经验,给出你关于Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException的解决方法建议,希望对你解决Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException有所启发或帮助;

我们(Spring Boot团队)之前已经看到过这种问题。不幸的是,JVM的诊断确实很差。它试图告诉您的是,它遇到了一个带有Class []属性的注释,该注释引用的类不在classpath上。如果它告诉您缺少的课程是什么,那将是非常有用的。

我尝试使用上面的代码片段重现您的失败,但是无法这样做。在使用Maven进行此工作时,请尝试查看unzip -l使用Maven和Gradle构建的jar的运行输出,看看是否可以发现Gradle案例中缺少的内容。

解决方法

更新:奇怪的是,仅当我使用Gradle构建jar时才会引发此错误。Maven生成的jar运行良好!因此,我目前正在研究gradle构建脚本/ spring
boot配置是否以及如何失败。

有一个Spring Boot应用程序抛出以下错误

 =========================
    AUTO-CONFIGURATION REPORT
    =========================

    Positive matches:
    -----------------

       DatasourceAutoConfiguration
          - @ConditionalOnClass classes found: org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType (OnClassCondition)

       DatasourceAutoConfiguration.DatasourceInitializerConfiguration
          - @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.jdbc.DatasourceInitializer; SearchStrategy: all) found no beans (OnBeanCondition)

       DatasourcetransactionManagerAutoConfiguration
          - @ConditionalOnClass classes found: org.springframework.jdbc.core.JdbcTemplate,org.springframework.transaction.PlatformtransactionManager (OnClassCondition)

       DatasourcetransactionManagerAutoConfiguration.transactionManagementConfiguration
          - @ConditionalOnMissingBean (types: org.springframework.transaction.Annotation.AbstracttransactionManagementConfiguration; SearchStrategy: all) found no beans (OnBeanCondition)

       DispatcherServletAutoConfiguration
          - found web application StandardServletEnvironment (OnWebApplicationCondition)
          - @ConditionalOnClass classes found: org.springframework.web.servlet.DispatcherServlet (OnClassCondition)

       DispatcherServletAutoConfiguration.DispatcherServletConfiguration
          - no ServletRegistrationBean found (DispatcherServletAutoConfiguration.DefaultDispatcherServletCondition)
          - @ConditionalOnClass classes found: javax.servlet.ServletRegistration (OnClassCondition)

       EmbeddedServletContainerAutoConfiguration
          - found web application StandardServletEnvironment (OnWebApplicationCondition)

       EmbeddedServletContainerAutoConfiguration.Embeddedtomcat
          - @ConditionalOnClass classes found: javax.servlet.Servlet,org.apache.catalina.startup.tomcat (OnClassCondition)
          - @ConditionalOnMissingBean (types: org.springframework.boot.context.embedded.EmbeddedServletContainerFactory; SearchStrategy: current) found no beans (OnBeanCondition)

       ErrorMvcAutoConfiguration
          - @ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet (OnClassCondition)
          - found web application StandardServletEnvironment (OnWebApplicationCondition)

       ErrorMvcAutoConfiguration#basicErrorController
          - @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ErrorController; SearchStrategy: current) found no beans (OnBeanCondition)

       ErrorMvcAutoConfiguration#errorAttributes
          - @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ErrorAttributes; SearchStrategy: current) found no beans (OnBeanCondition)

       ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration
          - No error template view detected (ErrorMvcAutoConfiguration.ErrorTemplateMissingCondition)
          - SpEL expression on org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration: ${error.whitelabel.enabled:truE} (OnExpressionCondition)

       ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#beAnnameViewResolver
          - @ConditionalOnMissingBean (types: org.springframework.web.servlet.view.beAnnameViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)

       ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#defaultErrorView
          - @ConditionalOnMissingBean (names: error; SearchStrategy: all) found no beans (OnBeanCondition)

       httpmessageConvertersAutoConfiguration
          - @ConditionalOnClass classes found: org.springframework.http.converter.httpmessageConverter (OnClassCondition)

       httpmessageConvertersAutoConfiguration#messageConverters
          - @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.httpmessageConverters; SearchStrategy: all) found no beans (OnBeanCondition)

       httpmessageConvertersAutoConfiguration.objectMappers
          - @ConditionalOnClass classes found: com.fasterxml.jackson.databind.objectMapper (OnClassCondition)

       httpmessageConvertersAutoConfiguration.objectMappers#mappingJackson2httpmessageConverter
          - @ConditionalOnMissingBean (types: org.springframework.http.converter.json.MappingJackson2httpmessageConverter; SearchStrategy: all) found no beans (OnBeanCondition)

       JacksonAutoConfiguration
          - @ConditionalOnClass classes found: com.fasterxml.jackson.databind.objectMapper (OnClassCondition)

       JacksonAutoConfiguration.JacksonObjectMapperAutoConfiguration
          - @ConditionalOnClass classes found: com.fasterxml.jackson.databind.objectMapper (OnClassCondition)

       JmxAutoConfiguration
          - @ConditionalOnClass classes found: org.springframework.jmx.export.MBeanExporter (OnClassCondition)
          - SpEL expression on org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration: ${spring.jmx.enabled:truE} (OnExpressionCondition)

       JmxAutoConfiguration#mbeanServer
          - @ConditionalOnMissingBean (types: javax.management.MBeanServer; SearchStrategy: all) found no beans (OnBeanCondition)

       MultipartAutoConfiguration
          - @ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.multipart.support.StandardServletMultipartResolver,javax.servlet.MultipartConfigElement (OnClassCondition)
          - SpEL expression on org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration: ${multipart.enabled:truE} (OnExpressionCondition)

       MultipartAutoConfiguration#multipartConfigElement
          - @ConditionalOnMissingBean (types: javax.servlet.MultipartConfigElement; SearchStrategy: all) found no beans (OnBeanCondition)

       MultipartAutoConfiguration#multipartResolver
          - @ConditionalOnMissingBean (types: org.springframework.web.multipart.support.StandardServletMultipartResolver; SearchStrategy: all) found no beans (OnBeanCondition)

       ServerPropertiesAutoConfiguration
          - found web application StandardServletEnvironment (OnWebApplicationCondition)

       ServerPropertiesAutoConfiguration#serverProperties
          - @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ServerProperties; SearchStrategy: current) found no beans (OnBeanCondition)

       WebMvcAutoConfiguration
          - found web application StandardServletEnvironment (OnWebApplicationCondition)
          - @ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet,org.springframework.web.servlet.config.Annotation.WebMvcConfigurerAdapter (OnClassCondition)
          - @ConditionalOnMissingBean (types: org.springframework.web.servlet.config.Annotation.WebMvcConfigurationSupport; SearchStrategy: all) found no beans (OnBeanCondition)

       WebMvcAutoConfiguration#hiddenhttpR_914_11845@ethodFilter
          - @ConditionalOnMissingBean (types: org.springframework.web.filter.HiddenhttpR_914_11845@ethodFilter; SearchStrategy: all) found no beans (OnBeanCondition)

       WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#beAnnameViewResolver
          - @ConditionalOnBean (types: org.springframework.web.servlet.View; SearchStrategy: all) found the following [error] (OnBeanCondition)

       WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#defaultViewResolver
          - @ConditionalOnMissingBean (types: org.springframework.web.servlet.view.InternalresourceViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)

       WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#requestContextListener
          - @ConditionalOnMissingBean (types: org.springframework.web.context.request.requestContextListener; SearchStrategy: all) found no beans (OnBeanCondition)

       WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#viewResolver
          - @ConditionalOnBean (types: org.springframework.web.servlet.ViewResolver; SearchStrategy: all) found the following [beAnnameViewResolver,defaultViewResolver] @ConditionalOnMissingBean (names: viewResolver; SearchStrategy: all) found no beans (OnBeanCondition)


    Negative matches:
    -----------------

      ....
....
       WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#dateFormatter
          - @ConditionalOnProperty missing required properties: date-format not found (OnPropertyCondition)

       WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#localeResolver
          - @ConditionalOnMissingBean (types: org.springframework.web.servlet.LocaleResolver; SearchStrategy: all) found no beans (OnBeanCondition)
          - @ConditionalOnProperty missing required properties: locale not found (OnPropertyCondition)

       WebSocketAutoConfiguration
          - required @ConditionalOnClass classes not found: org.springframework.web.socket.WebSocketHandler,org.apache.tomcat.websocket.server.WsSci (OnClassCondition)



    15:11:13.684 [main] ERROR o.s.boot.SpringApplication - Application startup failed
    org.springframework.beans.factory.beanCreationException: Error creaTing bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/Annotation/DelegaTingWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.Annotation.TypeNotPresentexceptionProxy
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) ~[spring-context-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109) ~[spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
    Exception in thread "main" org.springframework.beans.factory.beanCreationException: Error creaTing bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/Annotation/DelegaTingWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.Annotation.TypeNotPresentexceptionProxy
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:952) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
    Disconnected from the target VM,address: '127.0.0.1:61052',transport: 'socket'
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
        at org.ihc.phr.status.Initializer.main(Initializer.java:17) [main/:na]
    Caused by: java.lang.ArrayStoreException: sun.reflect.Annotation.TypeNotPresentexceptionProxy
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
        at sun.reflect.Annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_20]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
        at org.ihc.phr.status.Initializer.main(Initializer.java:17)
    Caused by: java.lang.ArrayStoreException: sun.reflect.Annotation.TypeNotPresentexceptionProxy
        at sun.reflect.Annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
        at sun.reflect.Annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
        at sun.reflect.Annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_20]
        at sun.reflect.Annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_20]
        at sun.reflect.Annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
        at sun.reflect.Annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_20]
        at sun.reflect.Annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
        at sun.reflect.Annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
        at sun.reflect.Annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_20]
        at sun.reflect.Annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
        at sun.reflect.Annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_20]
        at java.lang.Class.createAnnotationData(Class.java:3508)
        at java.lang.Class.createAnnotationData(Class.java:3508) ~[na:1.8.0_20]
        at java.lang.Class.AnnotationData(Class.java:3497)
        at java.lang.Class.createAnnotationData(Class.java:3513)
        at java.lang.Class.AnnotationData(Class.java:3497)
        at java.lang.Class.getDeclaredAnnotations(Class.java:3464)
        at org.springframework.core.Annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:352)
        at java.lang.Class.AnnotationData(Class.java:3497) ~[na:1.8.0_20]
        at org.springframework.core.Annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:319)
        at java.lang.Class.createAnnotationData(Class.java:3513) ~[na:1.8.0_20]
        at org.springframework.web.servlet.mvc.method.Annotation.requestMappingHandlerMapping.isHandler(requestMappingHandlerMapping.java:173)
        at java.lang.Class.AnnotationData(Class.java:3497) ~[na:1.8.0_20]
        at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:123)
        at java.lang.Class.getDeclaredAnnotations(Class.java:3464) ~[na:1.8.0_20]
        at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:103)
        at org.springframework.web.servlet.mvc.method.Annotation.requestMappingHandlerMapping.afterPropertiesSet(requestMappingHandlerMapping.java:126)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
        at org.springframework.core.Annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:352) ~[spring-core-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
        ... 15 more
        at org.springframework.core.Annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:319) ~[spring-core-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.web.servlet.mvc.method.Annotation.requestMappingHandlerMapping.isHandler(requestMappingHandlerMapping.java:173) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:123) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:103) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.web.servlet.mvc.method.Annotation.requestMappingHandlerMapping.afterPropertiesSet(requestMappingHandlerMapping.java:126) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
        ... 15 common frames omitted
    :bootRun FAILED

    FAILURE: Build failed with an exception.

初始化器:

@Configuration
@ComponentScan(basePackages={"com.mycompany","com.mycompany.utils","com.mycompany.domain","com.mycompany.resources","com.mycompany.resources.hook"})
@EnableAutoConfiguration
public class Initializer {

    public static void main(String[] args) {
        SpringApplication.run(Initializer.class,args);
    }


}

配置类

@Configuration
@EnableAsync
@Enablescheduling
@Propertysource("classpath:application-dev.properties")
@Importresource(value="classpath:applicationContext.xml")
@ComponentScan(basePackages={
        "com.mycompany.web"})
public class StatusConfiguration {
    @Autowired
    Environment env;

    @Bean
    public ObjectMapper jacksonObjectMapper() {
        return new CustomObjectMapper();
    }

    @Bean
    public TargetServer targetServer(){
        TargetServer targetServer = new TargetServer();
        targetServer.setJndiValidationConnectionURL(env.getProperty("jndiValidationConnectionURL"));
        targetServer.setJndiValidationUsername(env.getProperty("jndiValidationUsername"));
        targetServer.setJndiValidationpassword(env.getProperty("jndiValidationpassword"));
        return targetServer;
    }
}

控制者

@RestController
public class StatusController {

    @Autowired
    private Reportservice reportservice;

    @Autowired
    private TargetServer targetServer;

    private Logger log = LoggerFactory.getLogger(StatusController.class);

     @requestMapping(value = "/report")

        public MyReport getStatus(){
        MyReport report = reportservice.getReport();
        return report;
    }

    @requestMapping(value = "/report/no-cache")
    public MyReport getStatusnoCache(){
        autoRunReport();
        MyReport report = reportservice.getReport();
        return report;
    }


    @scheduled(fixedDelay=300000)
    public void autoRunReport(){
        reportservice.kickOffReport(targetServer);
        log.debug("Running the scheduled validation Report!");
    }

}

Gradle配置

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'spring-boot'

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web:1.1.6.RELEASE")
    compile(group: 'org.ihc.mh',name: 'mh-util',version:'13.12.5') {
exclude(module: 'slf4j-api')
exclude(module: 'slf4j-log4j12')
    }
   /* TESTCompile(group: 'org.springframework.boot',name: 'spring-boot-starter-test',version:'1.1.6.RELEASE') {
exclude(module: 'commons-logging')
    }*/
}

buildscript {
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.6.RELEASE")
    }
}

/*
idea {
    module {
        inheritOutputDirs = false
        outputDir = file("$buildDir/classes/main/")
    }
}*/

另外,如果我直接运行Initializer(作为Java可执行类),则运行良好。但是,当我将其打包为jar并运行jar文件时,此操作将失败。任何帮助/见解表示赞赏。

Gradle和Maven依赖库文件夹之间的差异

Only in Gradle Build: commons-logging-1.1.3.jar
Only in Gradle Build: jackson-Annotations-2.3.0.jar
Only in Gradle Build: spring-boot-starter-security-1.1.6.RELEASE.jar
Only in Gradle Build: spring-context-support-3.0.5.RELEASE.jar
Only in Gradle Build: spring-jdbc-3.0.5.RELEASE.jar
Only in Gradle Build: spring-security-config-3.2.5.RELEASE.jar
Only in Gradle Build: spring-security-core-3.2.5.RELEASE.jar
Only in Gradle Build: spring-security-web-3.2.5.RELEASE.jar
Only in Gradle Build: spring-tx-3.0.5.RELEASE.jar


Only in Maven Build: jackson-Annotations-2.3.4.jar
Only in Maven Build: spring-context-support-4.0.7.RELEASE.jar
Only in Maven Build: spring-jdbc-4.0.7.RELEASE.jar
Only in Maven Build: spring-tx-4.0.7.RELEASE.jar

大佬总结

以上是大佬教程为你收集整理的Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException全部内容,希望文章能够帮你解决Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。