Spring是如何解析有参构造器的?

 

在前面的章节,笔者对SpringIOC的源码做了详细的介绍,但跳过了一个地方,因为通常情况下,我们的对象是只会包含默认的构造器,不会采用有参构造器,而且就算是有参构造器也都停留在XML的阶段里,因此笔者直接将特殊的情况直接跳过了,一来是Spring在处理有参构造器时较为复杂,笔者本来是不打算介绍的,但考虑到如果读者有好奇心想要去深入了解,因此笔者在这里对SpringIOC的源码在做一些补充吧。提示:对于本章的学习,读者一定要熟悉SpringIOC的源码,不然会一脸懵逼。

我们先回顾下以前的文章

在本章中,笔者介绍了Spring创建对象的详细过程,但并没有提到Spring在处理有参构造器的时候是如何处理的

这里我们用案例简单回顾下我们的问题吧,创建一个类

package com;


import org.springframework.stereotype.Component;

@Component
public class MutipleConstructs {


  private Integer id;

  private String name;

  public MutipleConstructs() {
    System.out.printf("MutipleConstructs");
  }


  public MutipleConstructs(Integer id) {
    System.out.printf("MutipleConstructs参数:"+id);
    this.id = id;
  }

  public MutipleConstructs(Integer id, String name) {
    System.out.printf("MutipleConstructs参数:"+id+","+name);
    this.id = id;
    this.name = name;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }
}

然后还是同样的配置类

import com.MyAutowired;
import com.MyImportBeanDefinitionRegistrar;

import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
import org.springframework.context.annotation.*;

import java.lang.annotation.Annotation;
import java.util.LinkedHashSet;
import java.util.Set;

import static java.util.Arrays.asList;
import static org.springframework.context.annotation.AnnotationConfigUtils.AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME;

@Configuration
@ComponentScan("com")
/*@EnableAspectJAutoProxy*/
/*@Import(MyImportBeanDefinitionRegistrar.class)*/
public class AppConfig {


  //AutowiredAnnotationBeanPostProcessor
  /*@Bean*//*(name = AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAME)*//*
  public AutowiredAnnotationBeanPostProcessor autowiredAnnotationBeanPostProcessor(){
    AutowiredAnnotationBeanPostProcessor beanPostProcessor=
        new AutowiredAnnotationBeanPostProcessor();
    Set<Class<? extends Annotation>> autowiredAnnotationTypes
        =new LinkedHashSet<>(asList(MyAutowired.class));
    beanPostProcessor.setAutowiredAnnotationTypes(autowiredAnnotationTypes);
    return beanPostProcessor;
  }*/

}

测试类

import org.springframework.context.annotation.AnnotationConfigApplicationContext;


public class Test {


    public static void main(String[] args) {

      AnnotationConfigApplicationContext annotationConfigApplicationContext=
          new AnnotationConfigApplicationContext(AppConfig.class);
      /*String[] strings=annotationConfigApplicationContext.getBeanDefinitionNames();
      for (String string : strings) {
        System.out.println(string);
      }*/

    }
}

我们查看执行结果

"C:\Program Files\Java\jdk1.8.0_201\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\lib\idea_rt.jar=52021:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_201\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\rt.jar;E:\spring-framework-5.1.x\qitian0-Test\out\production\classes;E:\spring-framework-5.1.x\spring-webmvc\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity\1.6.2\1b470ec12a9b8aa69b0458a7e477dacb2cbdd6a0\velocity-1.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\ognl\ognl\2.7.3\8c391fdc943b352045bd35c4f57306ccc6442f7c\ognl-2.7.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-velocity\3.0.8\f596ad41c8bdbf70ea35cba145a810968eeee4f\tiles-velocity-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.2.71\7512db3b3182753bd2e48ce8d345abbadc40fe6b\kotlin-reflect-1.2.71.jar;E:\spring-framework-5.1.x\spring-context-support\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.mchange\c3p0\0.9.5.2\5f86cb6130bc6e8475615ed82d5b5e6fb226a86a\c3p0-0.9.5.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.quartz-scheduler\quartz\2.3.0\a090397102a12f6241177c5d501835334bb7662a\quartz-2.3.0.jar;E:\spring-framework-5.1.x\spring-jdbc\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.2.71\d9717625bb3c731561251f8dd2c67a1011d6764c\kotlin-stdlib-1.2.71.jar;E:\spring-framework-5.1.x\spring-context\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.ws\jaxws-api\2.3.1\15e46dba25b1f767a3f517721badf6cce8dbb13d\jaxws-api-2.3.1.jar;E:\spring-framework-5.1.x\spring-aop\out\production\classes;E:\spring-framework-5.1.x\spring-beans\out\production\classes;E:\spring-framework-5.1.x\spring-core\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.projectreactor\reactor-core\3.2.13.RELEASE\179d059b0062391eb037774d0c3376168e1a99da\reactor-core-3.2.13.RELEASE.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-buffer\4.1.44.Final\8b2add255e68d0fcb8ccdfaf07399980d3be840f\netty-buffer-4.1.44.Final.jar;E:\spring-framework-5.1.x\spring-core\build\libs\spring-cglib-repack-3.2.11.jar;E:\spring-framework-5.1.x\spring-core\build\libs\spring-objenesis-repack-3.0.1.jar;E:\spring-framework-5.1.x\spring-jcl\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.11.2\f5e9a2ffca496057d6891a3de65128efc636e26e\log4j-api-2.11.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.28\2cd9b264f76e3d087ee21bfc99305928e1bdb443\slf4j-api-1.7.28.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sf.jopt-simple\jopt-simple\5.0.4\4fdac2fbe92dfad86aa6e9301736f6b4342a3f5c\jopt-simple-5.0.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.5\1740dc9140103b796d1722668805fd4cf852780c\aspectjweaver-1.9.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava-reactive-streams\1.2.1\dac56d021c092c34662943dae3ab1432542005\rxjava-reactive-streams-1.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava\1.3.8\8c192792ad2e65a90867ab418ac49703f44d2baf\rxjava-1.3.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.2.16\4b88484cd4d02954243fc0a1a0b0a7503ca769a0\rxjava-2.2.16.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.2.71\ba18ca1aa0e40eb6f1865b324af2f4cbb691c1ec\kotlin-stdlib-common-1.2.71.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.reactivestreams\reactive-streams\1.0.2\323964c36556eb0e6209f65c1cef72b53b461ab8\reactive-streams-1.0.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-common\4.1.44.Final\cd09d9093791482acdcbe8e39ad6fdf62ea3ab7d\netty-common-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-xml\2.5.8\4e1db8ac25be2d7e7fa33a21ff921744a8207598\groovy-xml-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.23\ec62d74fe50689c28c0ff5b35d3aebcaa8b5be68\snakeyaml-1.23.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy\2.5.8\2f1e8ea55e625fe51e85ef35eb067f1d9c61772d\groovy-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.jamonapi\jamon\2.81\e81ca9fe23ff737e00645b4387a262b2e7a1d9c2\jamon-2.81.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.hazelcast\hazelcast-all\3.2.5\db26813386b8d8b2d0909d9b4e6fbe6f6247f6c7\hazelcast-all-3.2.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-pool2\2.6.2\775a8072995b29eafe8fb0a828a190589f71cede\commons-pool2-2.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sourceforge.findbugs\annotations\1.3.2\d77bc83e0408680034a29481a89de0dba9802a97\annotations-1.3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.ejb\javax.ejb-api\3.2\6da48d715f67cd6ad55e96cc55030532d35062f1\javax.ejb-api-3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-validator\5.4.3.Final\7c3d91629e81937b33dffd5b170956ef9c76af97\hibernate-validator-5.4.3.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.bind\jaxb-api\2.3.1\8531ad5ac454cc2deb9d4d32c40c4d7451939b5d\jaxb-api-2.3.1.jar;E:\spring-framework-5.1.x\spring-expression\out\production\classes;E:\spring-framework-5.1.x\spring-instrument\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.annotation\javax.annotation-api\1.3.2\934c04d3cfef185a8008e7bf34331b79730a9d43\javax.annotation-api-1.3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.enterprise.concurrent\javax.enterprise.concurrent-api\1.0\c392610c40aa3e0e7b57c47a1b561d4b3f974fac\javax.enterprise.concurrent-api-1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.interceptor\javax.interceptor-api\1.2.2\b076d5887ff19f7311fd70cbe03fa3d3d8628a8e\javax.interceptor-api-1.2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.money\money-api\1.0.3\d328418fdacc03001330fa5bc193367dcb853413\money-api-1.0.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.validation\validation-api\1.1.0.Final\8613ae82954779d518631e05daa73a6a954817d5\validation-api-1.1.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.beanshell\bsh\2.0b5\fdc2ab6ae8b53e0d4761b296c116df747cd85199\bsh-2.0b5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\joda-time\joda-time\2.10.5\7f1d89817cd20a32444d5ab4160f035ab9b864e7\joda-time-2.10.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.2\d81aff979d603edd90dcd8db2abc1f4ce6479e3e\javax.transaction-api-1.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.soap\javax.xml.soap-api\1.4.0\667ef2eee594ca7e05a1cbe0b37a428f7b57778f\javax.xml.soap-api-1.4.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.3.0.Final\3616bb87707910296e2c195dc016287080bba5af\jboss-logging-3.3.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.3.1\2ad2fd09dcf5607ca96f8ef432096a96986c40a\classmate-1.3.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.activation\javax.activation-api\1.2.0\85262acf3ca9816f9537ca47d5adeabaead7cb16\javax.activation-api-1.2.0.jar;E:\spring-framework-5.1.x\spring-tx\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.resource\javax.resource-api\1.7.1\f86b4d697ecd992ec6c4c6053736db16d41dc57f\javax.resource-api-1.7.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.3\e006adf5cf3cca2181d16bd640ecb80148ec0fce\javax.transaction-api-1.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.ibm.websphere\uow\6.0.2.17\df754f8fe0c9c6f837d00ddcc12632fef16ec239\uow-6.0.2.17.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.hsqldb\hsqldb\2.4.1\9daff99b4fbd6809fd46ab4327650ad00a1be6d4\hsqldb-2.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.h2database\h2\1.4.199\7bf08152984ed8859740ae3f97fae6c72771ae45\h2-1.4.199.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.derby\derby\10.14.2.0\7efad40ef52fbb1f08142f07a83b42d29e47d8ce\derby-10.14.2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.derby\derbyclient\10.14.2.0\fdd338d43e09bf7cd16f5523a0f717e5ef79a1a8\derbyclient-10.14.2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sf.ehcache\ehcache\2.10.4\9022b1eedfafa11039597b1c1918c1abe414df93\ehcache-2.10.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.mail\javax.mail-api\1.6.2\17a8151bab44f9c94f34c10db70d95ba3c830eda\javax.mail-api-1.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.cache\cache-api\1.1.0\77bdcff7814076dfa61611b0db88487c515150b6\cache-api-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.ben-manes.caffeine\caffeine\2.6.2\c8fd8817f9d2b2ced82f8968e0dd943aab557de0\caffeine-2.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.fabric3.api\commonj\1.1.0\11e7a4fbf6c257e221df0aadf9851d8992fe60ff\commonj-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.freemarker\freemarker\2.3.28\7200064467a935052f99d114c2c05c3d189bc6d6\freemarker-2.3.28.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP-java6\2.3.13\376d13a7b2dc57379c550619fe02ecfe51e62465\HikariCP-java6-2.3.13.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.mchange\mchange-commons-java\0.2.11\2a6a6c1fe25f28f5a073171956ce6250813467ef\mchange-commons-java-0.2.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-mustache\1.0.7\9512741d0042ff6ff6227c4a7c378307f388bbd7\tiles-request-mustache-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-mvel\3.0.8\7538c448d25c86b11ffb8027009feacd5dbea5c8\tiles-mvel-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-ognl\3.0.8\138753498a27322b35eedfa808428fb24a97c2c2\tiles-ognl-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity-tools\2.0\69936384de86857018b023a8c56ae0635c56b6a0\velocity-tools-2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi\4.1.1\c915f1a426213a8450fb473b5b3adb63f5ac1017\poi-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.spullara.mustache.java\compiler\0.8.4\371619789a3d6f75c9960dc50de0099b10342816\compiler-0.8.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-extras\3.0.8\4251303209066a9ac1a948d2badd19156b18d14b\tiles-extras-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-digester\commons-digester\2.0\3dbd8a76683cd563583a2c78c356ad8b8acf38bf\commons-digester-2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-jsp\3.0.8\7465a65e4b3821a9785995bcb5ce2f74098ab023\tiles-jsp-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-xml\2.9.9\4b8a210f1102307ec66028f744a1ede73a40ed2d\jackson-dataformat-xml-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-servlet\3.0.8\56c7ed54e70912ef6628dca464a54a5ecac587b3\tiles-servlet-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-freemarker\3.0.8\2d00cb648984176c3072ac3b41369b02e5a50897\tiles-freemarker-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-api\3.0.8\a3c4f741b1cf5ce578b85155cf640a932f617167\tiles-api-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-template\3.0.8\70b396cce5516f7069d15398f07bb32c9020a5df\tiles-template-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-templates\2.5.8\85563c8b59182144862ff29cfa70d3d486860364\groovy-templates-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi-ooxml-schemas\4.1.1\7bb506f074a5bffce6b367f40ee0535fa7f73003\poi-ooxml-schemas-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.9.9\d6eb9817d9c7289a91f043ac5ee02a6b3cc86238\jackson-databind-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi-ooxml\4.1.1\216d8bb4c064c3a1079e77d693cd60346dd63f38\poi-ooxml-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.librepdf\openpdf\1.2.21\299ac66b97c81e65a5995be1eebab18e581f8e41\openpdf-1.2.21.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-core\3.0.8\1f71d0545540ad4bd7b4d883b2ff763cffde237\tiles-core-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\12.0.1\b8e78b9af7bf45900e14c6f958486b6ca682195f\guava-12.0.1.jar;E:\spring-framework-5.1.x\spring-web\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport\4.1.44.Final\18a0ce8be8ca639982276efefc0a5604a6523d80\netty-transport-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-reactive-httpclient\1.0.3\2649ef74b389fa09194220b7f769970e4eaabcd9\jetty-reactive-httpclient-1.0.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java-util\3.6.1\35f62815e87c32b01bf1ed8c5aa3f9e33a08c2f3\protobuf-java-util-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.14.5\151ce36be627fa54e232bdce97a28ab52301b525\okhttp-3.14.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-http\9.4.25.v20191220\c3aa7da362f1a492667ce754ba16b2535b793668\jetty-http-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.rometools\rome\1.12.2\eaa7a2025cd38a6678d96b2b78b4f7e68e3f8e36\rome-1.12.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-servlet\9.4.25.v20191220\bee77d6a4f87dc90d5bc142cbd6cef470ec46aae\jetty-servlet-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.woodstox\woodstox-core\5.3.0\59a3a7fb46a364ee383ea7e8c67c152a224b3d99\woodstox-core-5.3.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.10\7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5\httpclient-4.5.10.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http\4.1.44.Final\6135c2b3a01e0e1ab4bd8bba89bdefe2d2b24a4c\netty-codec-http-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpasyncclient\4.1.4\f3a3240681faae3fa46b573a4c7e50cec9db0d86\httpasyncclient-4.1.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.synchronoss.cloud\nio-multipart-parser\1.1.0\c6c417fec6612584b1c34d4dd98c5a4e47e8c754\nio-multipart-parser-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport-native-epoll\4.1.44.Final\2b405e66f0237bc0e42251d4825bfa810fb60b68\netty-transport-native-epoll-4.1.44.Final-linux-x86_64.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\9.0.30\ad32909314fe2ba02cec036434c0addd19bcc580\tomcat-embed-core-9.0.30.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.undertow\undertow-core\2.0.29.Final\6837cd080712581779406f5b2c452afac6bc2e47\undertow-core-2.0.29.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler-proxy\4.1.44.Final\491c0997aa4b8b2e4bec41d1d50d211299f166a5\netty-handler-proxy-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-server\9.4.25.v20191220\5b352c9f9135a1c20e4808e5cb1d84fbddfdc460\jetty-server-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.projectreactor.netty\reactor-netty\0.8.14.RELEASE\8bd639f59fba24afbcd8abb93eaa57f96b2ad10b\reactor-netty-0.8.14.RELEASE.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-fileupload\commons-fileupload\1.4\f95188e3d372e20e7328706c37ef366e5d7859b0\commons-fileupload-1.4.jar;E:\spring-framework-5.1.x\spring-oxm\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.castor\castor-xml\1.4.1\2cee800a008291305ac4f3a67b674f9c6cb1d07a\castor-xml-1.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jibx\jibx-run\1.3.1\823bdac9c1781c112b36dd853d77da510c29d1a3\jibx-run-1.3.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.castor\castor-core\1.4.1\b973333a7ce1b8017dccba68068023c9d17f9872\castor-core-1.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.thoughtworks.xstream\xstream\1.4.11.1\6c120c45a8c480bb2fea5b56502e3993ddd74fd2\xstream-1.4.11.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-collections4\4.1\a4cf4688fe1c7e3a63aa636cc96d013af537768e\commons-collections4-4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\joda-time\joda-time\2.9.5\5f01da7306363fad2028b916f3eab926262de928\joda-time-2.9.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\xpp3\xpp3\1.1.3.4.O\1c165262edac1c1e4f0a67c1643c4b7476187034\xpp3-1.1.3.4.O.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\3.1.0\3cd63d075497751784b2fa84be59432f4905bf7c\javax.servlet-api-3.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet.jsp\javax.servlet.jsp-api\2.3.2-b02\287387015b38bb4fc5d5f085c938ab51bf82b00\javax.servlet.jsp-api-2.3.2-b02.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.el\javax.el-api\3.0.1-b04\8c0c970b8deae5054ff0bf4b17979c8181a506d3\javax.el-api-3.0.1-b04.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.faces\javax.faces-api\2.2\e314573935023b6151643e97e9629a2d9f6f604d\javax.faces-api-2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.json.bind\javax.json.bind-api\1.0\10332203cb05f4ab2e8bf058bfd7d99648c5ca68\javax.json.bind-api-1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.glassfish.main\javax.jws\4.0-b33\e95f8054a90a00fb02c3aa450ac0901b6ad8740e\javax.jws-4.0-b33.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-all\4.1.44.Final\1720921b2697d987117e111c8a23817bcacc7fdd\netty-all-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-security\9.4.25.v20191220\593ff5b5dfd5bf973184329f5d1209b9a411ec12\jetty-security-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml\aalto-xml\1.1.1\57f68eb93253802cb125af569fd81436cbae9c88\aalto-xml-1.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-jaxb-annotations\2.9.9\52fb643de81a60839750013a520f26b6259ddeff\jackson-module-jaxb-annotations-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-smile\2.9.9\85749406c69b08945d6059db679cc66990340ebc\jackson-dataformat-smile-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-cbor\2.9.9\3206f36ea2b0f9bd365a138338281243241dc9da\jackson-dataformat-cbor-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.5\f645ed69d595b24d4cf8b3fbb64cc505bede8829\gson-2.8.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.googlecode.protobuf-java-format\protobuf-java-format\1.4\b81e7d188c2cc766bc150bd3c77154178b3541d5\protobuf-java-format-1.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.caucho\hessian\4.0.51\29047eb08639a98e4b9437d7cbe81fb0471ba7\hessian-4.0.51.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http2\4.1.44.Final\84fd396e814af4278595e50f8c5089056771d19a\netty-codec-http2-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler\4.1.44.Final\c82cfba4ff7b79f3e7828c4ccbfebb756603cc8c\netty-handler-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.4.0.Final\b225692a59f7dc3a789d2c85edc06041914e97e7\jboss-logging-3.4.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.xnio\xnio-nio\3.3.8.Final\8dafaf230666e526c53e544ab6a9d6ecfcbab4ee\xnio-nio-3.3.8.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.xnio\xnio-api\3.3.8.Final\7942ba8330c91a12006c912e040d25a77a58c525\xnio-api-3.3.8.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat\tomcat-annotations-api\9.0.30\69e405494339f1a06097fbddbd93164dbf8bddaf\tomcat-annotations-api-9.0.30.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-client\9.4.25.v20191220\a845f43d3b5bb457866a8e0c2f728c388e181a0a\jetty-client-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-io\9.4.25.v20191220\3eb34b5481012701de0ea9dfaf2bdf1dbb947b16\jetty-io-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.synchronoss.cloud\nio-stream-storage\1.1.3\986dba5f6e5eed20f0dba6ddc8e8a64a9ebdc2f3\nio-stream-storage-1.1.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.rometools\rome-utils\1.12.2\240dc40fb9333ac872319e7d31178bffc63f7900\rome-utils-1.12.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.17.2\78c7820b205002da4d2d137f6f312bd64b3d6049\okio-1.17.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore-nio\4.4.10\486f90c2af9bb81c51e8fb905647267053d5441\httpcore-nio-4.4.10.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.12\21ebaf6d532bc350ba95bd81938fa5f0e511c132\httpcore-4.4.12.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.11\3acb4705652e16236558f0f4f2192cc33c3bd189\commons-codec-1.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.2\83b5b8a7ba1c08f9e8c8ff2373724e33d3c1e22a\commons-io-2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.woodstox\stax2-api\4.2\13c2b30926bca0429c704c4b4ca0b5d0432b69cd\stax2-api-4.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.9.0\7c10d545325e3a6e72e06381afe469fd40eb701\jackson-annotations-2.9.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.9.9\bfff5af9fb8347d26bbb7959cb9b4fe9a2b0ca5e\jackson-core-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\3.6.1\d06d46ecfd92ec6d0f3b423b4cd81cb38d8b924\protobuf-java-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\19.0\6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9\guava-19.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jdom\jdom2\2.0.6\6f14738ec2e9dd0011e343717fa624a10f8aab64\jdom2-2.0.6.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-socks\4.1.44.Final\d8ca370a3ddd9440368cf02b93896557ec13459\netty-codec-socks-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec\4.1.44.Final\4d759f5015a240a0635c59ce7acced9a364836d\netty-codec-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport-native-unix-common\4.1.44.Final\1af95c8d95aa55038d889944f709fa75efa94094\netty-transport-native-unix-common-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-resolver\4.1.44.Final\c644d209302d3fc7770dc0ca257e9f6fe8b38e47\netty-resolver-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-util\9.4.25.v20191220\fd8b642cc16728f1c36ca6a64653cb1b26ec0232\jetty-util-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.webjars\webjars-locator-core\0.37\cc422f6cceec523b52d0abc6cff42e3f22d3d2ca\webjars-locator-core-0.37.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\4.0.1\a27082684a2ff0bf397666c3943496c44541d1ca\javax.servlet-api-4.0.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet.jsp.jstl\javax.servlet.jsp.jstl-api\1.2.1\f072f63ab1689e885ac40c221df3e6bb3e64a84a\javax.servlet.jsp.jstl-api-1.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-freemarker\1.0.7\cf75182100f643bf32e063c83dc1d8e0bfc258b7\tiles-request-freemarker-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-compat\3.0.8\8890ecc25134919e03a4f15b41e83ee5335f7beb\tiles-compat-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-el\3.0.8\d006d8201c7d9cee6c679ef0b0911ce35ced9187\tiles-el-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-jsp\1.0.7\6a9bde44749334e9ef85d0bdf854ff20641c113\tiles-request-jsp-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-servlet-wildcard\1.0.7\2b151fbe0d3c4b0d3cd6b804b30002a878189b74\tiles-request-servlet-wildcard-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-velocity\1.0.7\a79b6608238a31ee8b3ffabff824daed7df5251c\tiles-request-velocity-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-servlet\1.0.7\e9b9e3cda2a489b3292ed3a15a558b2b57ad0940\tiles-request-servlet-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-api\1.0.7\c649a9be6df263c888a2195447cd602d530cc233\tiles-request-api-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.8.1\6505a72a097d9270f7a9e7bf42c4238283247755\commons-lang3-3.8.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.19\7e65777fb451ddab6a9c054beb879e521b7eab78\commons-compress-1.19.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.albfernandez\juniversalchardet\2.3.0\48441094fd92f5eb5d60ab0193a76151ebd48633\juniversalchardet-2.3.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.virtuald\curvesapi\1.06\159dd2e8956459a4eb0a9a6ecda9004d8d289708\curvesapi-1.06.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.woodstox\woodstox-core\5.1.0\bd416e84cbd20cb5f2cf13c30b023e814a4d6107\woodstox-core-5.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.woodstox\stax2-api\4.1\b6e20f3760016b70358e9227be904ecb26a50530\stax2-api-4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.13\3f18e1aa31031d89db6f01ba05d501258ce69d2c\commons-codec-1.13.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-collections4\4.4\62ebe7544cb7164d87e0637a2a6a2bdc981395e8\commons-collections4-4.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-math3\3.6.1\e4ba98f1d4b3c80ec46392f25e094a6a2e58fcbf\commons-math3-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.xmlbeans\xmlbeans\3.1.0\6dac1f897dfb3e3f17fc79b18a3353b2e51c464e\xmlbeans-3.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-beanutils\commons-beanutils\1.8.0\c651d5103c649c12b20d53731643e5fffceb536\commons-beanutils-1.8.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-autotag-core-runtime\1.2\100bd3cae1a5debf9afb4ef5c8b36c508d06326\tiles-autotag-core-runtime-1.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.mvel\mvel2\2.0.11\14bb21dabd899d2e60d9c0d008f267ed0d6c9ea8\mvel2-2.0.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\1.3.9\40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf\jsr305-1.3.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-collections\commons-collections\3.2.1\761ea405b9b37ced573d2df0d1e3a4e0f9edc668\commons-collections-3.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\oro\oro\2.0.8\5592374f834645c4ae250f4c9fbb314c9369d698\oro-2.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\jboss\javassist\3.7.ga\6d271a67a1d8718bfb225ace5a25f1c09427c9f8\javassist-3.7.ga.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-lang\commons-lang\2.4\16313e02a793435009f1e458fa4af5d879f6fb11\commons-lang-2.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-jasper\8.5.5\4dba14bb5d4d68460461285ecb60e57668b154f\tomcat-embed-jasper-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\8.5.5\d55e12a418ff99ecd723a118c2a28bb91079972d\tomcat-embed-core-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\8.5.5\54bd595afa6e4fd141c70fb2d1cecacf4bd11e53\tomcat-embed-el-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jdt.core.compiler\ecj\4.5.1\bee1367ac12fb6a20b422ff8711ebeb4f0a42316\ecj-4.5.1.jar" Test
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
MutipleConstructs
Process finished with exit code 0

可以看到这里打印了日志MutipleConstructs,说明我们创建了多个构造器,却依旧执行了默认构造器,如果我们修改下这个类MutipleConstructs

package com;


import org.springframework.stereotype.Component;

@Component
public class MutipleConstructs {


  private Integer id;

  private String name;

/*  public MutipleConstructs() {
    System.out.printf("MutipleConstructs");
  }*/


  public MutipleConstructs(Integer id) {
    System.out.printf("MutipleConstructs参数:"+id);
    this.id = id;
  }

  public MutipleConstructs(Integer id, String name) {
    System.out.printf("MutipleConstructs参数:"+id+","+name);
    this.id = id;
    this.name = name;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }
}

再次执行

"C:\Program Files\Java\jdk1.8.0_201\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\lib\idea_rt.jar=52054:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_201\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\rt.jar;E:\spring-framework-5.1.x\qitian0-Test\out\production\classes;E:\spring-framework-5.1.x\spring-webmvc\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity\1.6.2\1b470ec12a9b8aa69b0458a7e477dacb2cbdd6a0\velocity-1.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\ognl\ognl\2.7.3\8c391fdc943b352045bd35c4f57306ccc6442f7c\ognl-2.7.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-velocity\3.0.8\f596ad41c8bdbf70ea35cba145a810968eeee4f\tiles-velocity-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.2.71\7512db3b3182753bd2e48ce8d345abbadc40fe6b\kotlin-reflect-1.2.71.jar;E:\spring-framework-5.1.x\spring-context-support\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.mchange\c3p0\0.9.5.2\5f86cb6130bc6e8475615ed82d5b5e6fb226a86a\c3p0-0.9.5.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.quartz-scheduler\quartz\2.3.0\a090397102a12f6241177c5d501835334bb7662a\quartz-2.3.0.jar;E:\spring-framework-5.1.x\spring-jdbc\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.2.71\d9717625bb3c731561251f8dd2c67a1011d6764c\kotlin-stdlib-1.2.71.jar;E:\spring-framework-5.1.x\spring-context\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.ws\jaxws-api\2.3.1\15e46dba25b1f767a3f517721badf6cce8dbb13d\jaxws-api-2.3.1.jar;E:\spring-framework-5.1.x\spring-aop\out\production\classes;E:\spring-framework-5.1.x\spring-beans\out\production\classes;E:\spring-framework-5.1.x\spring-core\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.projectreactor\reactor-core\3.2.13.RELEASE\179d059b0062391eb037774d0c3376168e1a99da\reactor-core-3.2.13.RELEASE.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-buffer\4.1.44.Final\8b2add255e68d0fcb8ccdfaf07399980d3be840f\netty-buffer-4.1.44.Final.jar;E:\spring-framework-5.1.x\spring-core\build\libs\spring-cglib-repack-3.2.11.jar;E:\spring-framework-5.1.x\spring-core\build\libs\spring-objenesis-repack-3.0.1.jar;E:\spring-framework-5.1.x\spring-jcl\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.11.2\f5e9a2ffca496057d6891a3de65128efc636e26e\log4j-api-2.11.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.28\2cd9b264f76e3d087ee21bfc99305928e1bdb443\slf4j-api-1.7.28.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sf.jopt-simple\jopt-simple\5.0.4\4fdac2fbe92dfad86aa6e9301736f6b4342a3f5c\jopt-simple-5.0.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.5\1740dc9140103b796d1722668805fd4cf852780c\aspectjweaver-1.9.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava-reactive-streams\1.2.1\dac56d021c092c34662943dae3ab1432542005\rxjava-reactive-streams-1.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava\1.3.8\8c192792ad2e65a90867ab418ac49703f44d2baf\rxjava-1.3.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.2.16\4b88484cd4d02954243fc0a1a0b0a7503ca769a0\rxjava-2.2.16.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.2.71\ba18ca1aa0e40eb6f1865b324af2f4cbb691c1ec\kotlin-stdlib-common-1.2.71.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.reactivestreams\reactive-streams\1.0.2\323964c36556eb0e6209f65c1cef72b53b461ab8\reactive-streams-1.0.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-common\4.1.44.Final\cd09d9093791482acdcbe8e39ad6fdf62ea3ab7d\netty-common-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-xml\2.5.8\4e1db8ac25be2d7e7fa33a21ff921744a8207598\groovy-xml-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.23\ec62d74fe50689c28c0ff5b35d3aebcaa8b5be68\snakeyaml-1.23.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy\2.5.8\2f1e8ea55e625fe51e85ef35eb067f1d9c61772d\groovy-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.jamonapi\jamon\2.81\e81ca9fe23ff737e00645b4387a262b2e7a1d9c2\jamon-2.81.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.hazelcast\hazelcast-all\3.2.5\db26813386b8d8b2d0909d9b4e6fbe6f6247f6c7\hazelcast-all-3.2.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-pool2\2.6.2\775a8072995b29eafe8fb0a828a190589f71cede\commons-pool2-2.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sourceforge.findbugs\annotations\1.3.2\d77bc83e0408680034a29481a89de0dba9802a97\annotations-1.3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.ejb\javax.ejb-api\3.2\6da48d715f67cd6ad55e96cc55030532d35062f1\javax.ejb-api-3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-validator\5.4.3.Final\7c3d91629e81937b33dffd5b170956ef9c76af97\hibernate-validator-5.4.3.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.bind\jaxb-api\2.3.1\8531ad5ac454cc2deb9d4d32c40c4d7451939b5d\jaxb-api-2.3.1.jar;E:\spring-framework-5.1.x\spring-expression\out\production\classes;E:\spring-framework-5.1.x\spring-instrument\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.annotation\javax.annotation-api\1.3.2\934c04d3cfef185a8008e7bf34331b79730a9d43\javax.annotation-api-1.3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.enterprise.concurrent\javax.enterprise.concurrent-api\1.0\c392610c40aa3e0e7b57c47a1b561d4b3f974fac\javax.enterprise.concurrent-api-1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.interceptor\javax.interceptor-api\1.2.2\b076d5887ff19f7311fd70cbe03fa3d3d8628a8e\javax.interceptor-api-1.2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.money\money-api\1.0.3\d328418fdacc03001330fa5bc193367dcb853413\money-api-1.0.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.validation\validation-api\1.1.0.Final\8613ae82954779d518631e05daa73a6a954817d5\validation-api-1.1.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.beanshell\bsh\2.0b5\fdc2ab6ae8b53e0d4761b296c116df747cd85199\bsh-2.0b5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\joda-time\joda-time\2.10.5\7f1d89817cd20a32444d5ab4160f035ab9b864e7\joda-time-2.10.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.2\d81aff979d603edd90dcd8db2abc1f4ce6479e3e\javax.transaction-api-1.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.soap\javax.xml.soap-api\1.4.0\667ef2eee594ca7e05a1cbe0b37a428f7b57778f\javax.xml.soap-api-1.4.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.3.0.Final\3616bb87707910296e2c195dc016287080bba5af\jboss-logging-3.3.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.3.1\2ad2fd09dcf5607ca96f8ef432096a96986c40a\classmate-1.3.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.activation\javax.activation-api\1.2.0\85262acf3ca9816f9537ca47d5adeabaead7cb16\javax.activation-api-1.2.0.jar;E:\spring-framework-5.1.x\spring-tx\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.resource\javax.resource-api\1.7.1\f86b4d697ecd992ec6c4c6053736db16d41dc57f\javax.resource-api-1.7.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.3\e006adf5cf3cca2181d16bd640ecb80148ec0fce\javax.transaction-api-1.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.ibm.websphere\uow\6.0.2.17\df754f8fe0c9c6f837d00ddcc12632fef16ec239\uow-6.0.2.17.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.hsqldb\hsqldb\2.4.1\9daff99b4fbd6809fd46ab4327650ad00a1be6d4\hsqldb-2.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.h2database\h2\1.4.199\7bf08152984ed8859740ae3f97fae6c72771ae45\h2-1.4.199.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.derby\derby\10.14.2.0\7efad40ef52fbb1f08142f07a83b42d29e47d8ce\derby-10.14.2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.derby\derbyclient\10.14.2.0\fdd338d43e09bf7cd16f5523a0f717e5ef79a1a8\derbyclient-10.14.2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sf.ehcache\ehcache\2.10.4\9022b1eedfafa11039597b1c1918c1abe414df93\ehcache-2.10.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.mail\javax.mail-api\1.6.2\17a8151bab44f9c94f34c10db70d95ba3c830eda\javax.mail-api-1.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.cache\cache-api\1.1.0\77bdcff7814076dfa61611b0db88487c515150b6\cache-api-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.ben-manes.caffeine\caffeine\2.6.2\c8fd8817f9d2b2ced82f8968e0dd943aab557de0\caffeine-2.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.fabric3.api\commonj\1.1.0\11e7a4fbf6c257e221df0aadf9851d8992fe60ff\commonj-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.freemarker\freemarker\2.3.28\7200064467a935052f99d114c2c05c3d189bc6d6\freemarker-2.3.28.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP-java6\2.3.13\376d13a7b2dc57379c550619fe02ecfe51e62465\HikariCP-java6-2.3.13.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.mchange\mchange-commons-java\0.2.11\2a6a6c1fe25f28f5a073171956ce6250813467ef\mchange-commons-java-0.2.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-mustache\1.0.7\9512741d0042ff6ff6227c4a7c378307f388bbd7\tiles-request-mustache-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-mvel\3.0.8\7538c448d25c86b11ffb8027009feacd5dbea5c8\tiles-mvel-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-ognl\3.0.8\138753498a27322b35eedfa808428fb24a97c2c2\tiles-ognl-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity-tools\2.0\69936384de86857018b023a8c56ae0635c56b6a0\velocity-tools-2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi\4.1.1\c915f1a426213a8450fb473b5b3adb63f5ac1017\poi-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.spullara.mustache.java\compiler\0.8.4\371619789a3d6f75c9960dc50de0099b10342816\compiler-0.8.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-extras\3.0.8\4251303209066a9ac1a948d2badd19156b18d14b\tiles-extras-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-digester\commons-digester\2.0\3dbd8a76683cd563583a2c78c356ad8b8acf38bf\commons-digester-2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-jsp\3.0.8\7465a65e4b3821a9785995bcb5ce2f74098ab023\tiles-jsp-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-xml\2.9.9\4b8a210f1102307ec66028f744a1ede73a40ed2d\jackson-dataformat-xml-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-servlet\3.0.8\56c7ed54e70912ef6628dca464a54a5ecac587b3\tiles-servlet-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-freemarker\3.0.8\2d00cb648984176c3072ac3b41369b02e5a50897\tiles-freemarker-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-api\3.0.8\a3c4f741b1cf5ce578b85155cf640a932f617167\tiles-api-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-template\3.0.8\70b396cce5516f7069d15398f07bb32c9020a5df\tiles-template-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-templates\2.5.8\85563c8b59182144862ff29cfa70d3d486860364\groovy-templates-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi-ooxml-schemas\4.1.1\7bb506f074a5bffce6b367f40ee0535fa7f73003\poi-ooxml-schemas-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.9.9\d6eb9817d9c7289a91f043ac5ee02a6b3cc86238\jackson-databind-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi-ooxml\4.1.1\216d8bb4c064c3a1079e77d693cd60346dd63f38\poi-ooxml-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.librepdf\openpdf\1.2.21\299ac66b97c81e65a5995be1eebab18e581f8e41\openpdf-1.2.21.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-core\3.0.8\1f71d0545540ad4bd7b4d883b2ff763cffde237\tiles-core-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\12.0.1\b8e78b9af7bf45900e14c6f958486b6ca682195f\guava-12.0.1.jar;E:\spring-framework-5.1.x\spring-web\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport\4.1.44.Final\18a0ce8be8ca639982276efefc0a5604a6523d80\netty-transport-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-reactive-httpclient\1.0.3\2649ef74b389fa09194220b7f769970e4eaabcd9\jetty-reactive-httpclient-1.0.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java-util\3.6.1\35f62815e87c32b01bf1ed8c5aa3f9e33a08c2f3\protobuf-java-util-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.14.5\151ce36be627fa54e232bdce97a28ab52301b525\okhttp-3.14.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-http\9.4.25.v20191220\c3aa7da362f1a492667ce754ba16b2535b793668\jetty-http-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.rometools\rome\1.12.2\eaa7a2025cd38a6678d96b2b78b4f7e68e3f8e36\rome-1.12.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-servlet\9.4.25.v20191220\bee77d6a4f87dc90d5bc142cbd6cef470ec46aae\jetty-servlet-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.woodstox\woodstox-core\5.3.0\59a3a7fb46a364ee383ea7e8c67c152a224b3d99\woodstox-core-5.3.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.10\7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5\httpclient-4.5.10.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http\4.1.44.Final\6135c2b3a01e0e1ab4bd8bba89bdefe2d2b24a4c\netty-codec-http-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpasyncclient\4.1.4\f3a3240681faae3fa46b573a4c7e50cec9db0d86\httpasyncclient-4.1.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.synchronoss.cloud\nio-multipart-parser\1.1.0\c6c417fec6612584b1c34d4dd98c5a4e47e8c754\nio-multipart-parser-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport-native-epoll\4.1.44.Final\2b405e66f0237bc0e42251d4825bfa810fb60b68\netty-transport-native-epoll-4.1.44.Final-linux-x86_64.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\9.0.30\ad32909314fe2ba02cec036434c0addd19bcc580\tomcat-embed-core-9.0.30.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.undertow\undertow-core\2.0.29.Final\6837cd080712581779406f5b2c452afac6bc2e47\undertow-core-2.0.29.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler-proxy\4.1.44.Final\491c0997aa4b8b2e4bec41d1d50d211299f166a5\netty-handler-proxy-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-server\9.4.25.v20191220\5b352c9f9135a1c20e4808e5cb1d84fbddfdc460\jetty-server-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.projectreactor.netty\reactor-netty\0.8.14.RELEASE\8bd639f59fba24afbcd8abb93eaa57f96b2ad10b\reactor-netty-0.8.14.RELEASE.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-fileupload\commons-fileupload\1.4\f95188e3d372e20e7328706c37ef366e5d7859b0\commons-fileupload-1.4.jar;E:\spring-framework-5.1.x\spring-oxm\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.castor\castor-xml\1.4.1\2cee800a008291305ac4f3a67b674f9c6cb1d07a\castor-xml-1.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jibx\jibx-run\1.3.1\823bdac9c1781c112b36dd853d77da510c29d1a3\jibx-run-1.3.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.castor\castor-core\1.4.1\b973333a7ce1b8017dccba68068023c9d17f9872\castor-core-1.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.thoughtworks.xstream\xstream\1.4.11.1\6c120c45a8c480bb2fea5b56502e3993ddd74fd2\xstream-1.4.11.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-collections4\4.1\a4cf4688fe1c7e3a63aa636cc96d013af537768e\commons-collections4-4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\joda-time\joda-time\2.9.5\5f01da7306363fad2028b916f3eab926262de928\joda-time-2.9.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\xpp3\xpp3\1.1.3.4.O\1c165262edac1c1e4f0a67c1643c4b7476187034\xpp3-1.1.3.4.O.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\3.1.0\3cd63d075497751784b2fa84be59432f4905bf7c\javax.servlet-api-3.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet.jsp\javax.servlet.jsp-api\2.3.2-b02\287387015b38bb4fc5d5f085c938ab51bf82b00\javax.servlet.jsp-api-2.3.2-b02.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.el\javax.el-api\3.0.1-b04\8c0c970b8deae5054ff0bf4b17979c8181a506d3\javax.el-api-3.0.1-b04.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.faces\javax.faces-api\2.2\e314573935023b6151643e97e9629a2d9f6f604d\javax.faces-api-2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.json.bind\javax.json.bind-api\1.0\10332203cb05f4ab2e8bf058bfd7d99648c5ca68\javax.json.bind-api-1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.glassfish.main\javax.jws\4.0-b33\e95f8054a90a00fb02c3aa450ac0901b6ad8740e\javax.jws-4.0-b33.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-all\4.1.44.Final\1720921b2697d987117e111c8a23817bcacc7fdd\netty-all-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-security\9.4.25.v20191220\593ff5b5dfd5bf973184329f5d1209b9a411ec12\jetty-security-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml\aalto-xml\1.1.1\57f68eb93253802cb125af569fd81436cbae9c88\aalto-xml-1.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-jaxb-annotations\2.9.9\52fb643de81a60839750013a520f26b6259ddeff\jackson-module-jaxb-annotations-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-smile\2.9.9\85749406c69b08945d6059db679cc66990340ebc\jackson-dataformat-smile-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-cbor\2.9.9\3206f36ea2b0f9bd365a138338281243241dc9da\jackson-dataformat-cbor-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.5\f645ed69d595b24d4cf8b3fbb64cc505bede8829\gson-2.8.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.googlecode.protobuf-java-format\protobuf-java-format\1.4\b81e7d188c2cc766bc150bd3c77154178b3541d5\protobuf-java-format-1.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.caucho\hessian\4.0.51\29047eb08639a98e4b9437d7cbe81fb0471ba7\hessian-4.0.51.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http2\4.1.44.Final\84fd396e814af4278595e50f8c5089056771d19a\netty-codec-http2-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler\4.1.44.Final\c82cfba4ff7b79f3e7828c4ccbfebb756603cc8c\netty-handler-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.4.0.Final\b225692a59f7dc3a789d2c85edc06041914e97e7\jboss-logging-3.4.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.xnio\xnio-nio\3.3.8.Final\8dafaf230666e526c53e544ab6a9d6ecfcbab4ee\xnio-nio-3.3.8.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.xnio\xnio-api\3.3.8.Final\7942ba8330c91a12006c912e040d25a77a58c525\xnio-api-3.3.8.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat\tomcat-annotations-api\9.0.30\69e405494339f1a06097fbddbd93164dbf8bddaf\tomcat-annotations-api-9.0.30.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-client\9.4.25.v20191220\a845f43d3b5bb457866a8e0c2f728c388e181a0a\jetty-client-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-io\9.4.25.v20191220\3eb34b5481012701de0ea9dfaf2bdf1dbb947b16\jetty-io-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.synchronoss.cloud\nio-stream-storage\1.1.3\986dba5f6e5eed20f0dba6ddc8e8a64a9ebdc2f3\nio-stream-storage-1.1.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.rometools\rome-utils\1.12.2\240dc40fb9333ac872319e7d31178bffc63f7900\rome-utils-1.12.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.17.2\78c7820b205002da4d2d137f6f312bd64b3d6049\okio-1.17.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore-nio\4.4.10\486f90c2af9bb81c51e8fb905647267053d5441\httpcore-nio-4.4.10.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.12\21ebaf6d532bc350ba95bd81938fa5f0e511c132\httpcore-4.4.12.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.11\3acb4705652e16236558f0f4f2192cc33c3bd189\commons-codec-1.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.2\83b5b8a7ba1c08f9e8c8ff2373724e33d3c1e22a\commons-io-2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.woodstox\stax2-api\4.2\13c2b30926bca0429c704c4b4ca0b5d0432b69cd\stax2-api-4.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.9.0\7c10d545325e3a6e72e06381afe469fd40eb701\jackson-annotations-2.9.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.9.9\bfff5af9fb8347d26bbb7959cb9b4fe9a2b0ca5e\jackson-core-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\3.6.1\d06d46ecfd92ec6d0f3b423b4cd81cb38d8b924\protobuf-java-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\19.0\6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9\guava-19.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jdom\jdom2\2.0.6\6f14738ec2e9dd0011e343717fa624a10f8aab64\jdom2-2.0.6.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-socks\4.1.44.Final\d8ca370a3ddd9440368cf02b93896557ec13459\netty-codec-socks-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec\4.1.44.Final\4d759f5015a240a0635c59ce7acced9a364836d\netty-codec-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport-native-unix-common\4.1.44.Final\1af95c8d95aa55038d889944f709fa75efa94094\netty-transport-native-unix-common-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-resolver\4.1.44.Final\c644d209302d3fc7770dc0ca257e9f6fe8b38e47\netty-resolver-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-util\9.4.25.v20191220\fd8b642cc16728f1c36ca6a64653cb1b26ec0232\jetty-util-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.webjars\webjars-locator-core\0.37\cc422f6cceec523b52d0abc6cff42e3f22d3d2ca\webjars-locator-core-0.37.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\4.0.1\a27082684a2ff0bf397666c3943496c44541d1ca\javax.servlet-api-4.0.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet.jsp.jstl\javax.servlet.jsp.jstl-api\1.2.1\f072f63ab1689e885ac40c221df3e6bb3e64a84a\javax.servlet.jsp.jstl-api-1.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-freemarker\1.0.7\cf75182100f643bf32e063c83dc1d8e0bfc258b7\tiles-request-freemarker-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-compat\3.0.8\8890ecc25134919e03a4f15b41e83ee5335f7beb\tiles-compat-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-el\3.0.8\d006d8201c7d9cee6c679ef0b0911ce35ced9187\tiles-el-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-jsp\1.0.7\6a9bde44749334e9ef85d0bdf854ff20641c113\tiles-request-jsp-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-servlet-wildcard\1.0.7\2b151fbe0d3c4b0d3cd6b804b30002a878189b74\tiles-request-servlet-wildcard-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-velocity\1.0.7\a79b6608238a31ee8b3ffabff824daed7df5251c\tiles-request-velocity-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-servlet\1.0.7\e9b9e3cda2a489b3292ed3a15a558b2b57ad0940\tiles-request-servlet-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-api\1.0.7\c649a9be6df263c888a2195447cd602d530cc233\tiles-request-api-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.8.1\6505a72a097d9270f7a9e7bf42c4238283247755\commons-lang3-3.8.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.19\7e65777fb451ddab6a9c054beb879e521b7eab78\commons-compress-1.19.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.albfernandez\juniversalchardet\2.3.0\48441094fd92f5eb5d60ab0193a76151ebd48633\juniversalchardet-2.3.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.virtuald\curvesapi\1.06\159dd2e8956459a4eb0a9a6ecda9004d8d289708\curvesapi-1.06.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.woodstox\woodstox-core\5.1.0\bd416e84cbd20cb5f2cf13c30b023e814a4d6107\woodstox-core-5.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.woodstox\stax2-api\4.1\b6e20f3760016b70358e9227be904ecb26a50530\stax2-api-4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.13\3f18e1aa31031d89db6f01ba05d501258ce69d2c\commons-codec-1.13.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-collections4\4.4\62ebe7544cb7164d87e0637a2a6a2bdc981395e8\commons-collections4-4.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-math3\3.6.1\e4ba98f1d4b3c80ec46392f25e094a6a2e58fcbf\commons-math3-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.xmlbeans\xmlbeans\3.1.0\6dac1f897dfb3e3f17fc79b18a3353b2e51c464e\xmlbeans-3.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-beanutils\commons-beanutils\1.8.0\c651d5103c649c12b20d53731643e5fffceb536\commons-beanutils-1.8.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-autotag-core-runtime\1.2\100bd3cae1a5debf9afb4ef5c8b36c508d06326\tiles-autotag-core-runtime-1.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.mvel\mvel2\2.0.11\14bb21dabd899d2e60d9c0d008f267ed0d6c9ea8\mvel2-2.0.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\1.3.9\40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf\jsr305-1.3.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-collections\commons-collections\3.2.1\761ea405b9b37ced573d2df0d1e3a4e0f9edc668\commons-collections-3.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\oro\oro\2.0.8\5592374f834645c4ae250f4c9fbb314c9369d698\oro-2.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\jboss\javassist\3.7.ga\6d271a67a1d8718bfb225ace5a25f1c09427c9f8\javassist-3.7.ga.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-lang\commons-lang\2.4\16313e02a793435009f1e458fa4af5d879f6fb11\commons-lang-2.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-jasper\8.5.5\4dba14bb5d4d68460461285ecb60e57668b154f\tomcat-embed-jasper-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\8.5.5\d55e12a418ff99ecd723a118c2a28bb91079972d\tomcat-embed-core-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\8.5.5\54bd595afa6e4fd141c70fb2d1cecacf4bd11e53\tomcat-embed-el-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jdt.core.compiler\ecj\4.5.1\bee1367ac12fb6a20b422ff8711ebeb4f0a42316\ecj-4.5.1.jar" Test
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mutipleConstructs' defined in file [E:\spring-framework-5.1.x\qitian0-Test\out\production\classes\com\MutipleConstructs.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.MutipleConstructs]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.MutipleConstructs.<init>()
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1322)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1213)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:559)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:321)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:848)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:892)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:556)
  at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:100)
  at Test.main(Test.java:10)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.MutipleConstructs]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.MutipleConstructs.<init>()
  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:83)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1314)
  ... 12 more
Caused by: java.lang.NoSuchMethodException: com.MutipleConstructs.<init>()
  at java.lang.Class.getConstructor0(Class.java:3082)
  at java.lang.Class.getDeclaredConstructor(Class.java:2178)
  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78)
  ... 13 more

Process finished with exit code 1

注意这里的异常信息,它是说有参构造器太多,不能确认是哪一个使我们想要的,这是构造器决策失败的异常,我们再来修改下代码

package com;


import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
public class MutipleConstructs {


  private Integer id;

  private String name;

/*  public MutipleConstructs() {
    System.out.printf("MutipleConstructs");
  }*/

    public MutipleConstructs(Integer id) {
    System.out.printf("MutipleConstructs参数:"+id);
    this.id = id;
  }

  /*public MutipleConstructs(Integer id, String name) {
    System.out.printf("MutipleConstructs参数:"+id+","+name);
    this.id = id;
    this.name = name;
  }*/

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }
}

然后我们再来测试下

"C:\Program Files\Java\jdk1.8.0_201\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\lib\idea_rt.jar=52079:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_201\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_201\jre\lib\rt.jar;E:\spring-framework-5.1.x\qitian0-Test\out\production\classes;E:\spring-framework-5.1.x\spring-webmvc\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity\1.6.2\1b470ec12a9b8aa69b0458a7e477dacb2cbdd6a0\velocity-1.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\ognl\ognl\2.7.3\8c391fdc943b352045bd35c4f57306ccc6442f7c\ognl-2.7.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-velocity\3.0.8\f596ad41c8bdbf70ea35cba145a810968eeee4f\tiles-velocity-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.2.71\7512db3b3182753bd2e48ce8d345abbadc40fe6b\kotlin-reflect-1.2.71.jar;E:\spring-framework-5.1.x\spring-context-support\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.mchange\c3p0\0.9.5.2\5f86cb6130bc6e8475615ed82d5b5e6fb226a86a\c3p0-0.9.5.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.quartz-scheduler\quartz\2.3.0\a090397102a12f6241177c5d501835334bb7662a\quartz-2.3.0.jar;E:\spring-framework-5.1.x\spring-jdbc\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.2.71\d9717625bb3c731561251f8dd2c67a1011d6764c\kotlin-stdlib-1.2.71.jar;E:\spring-framework-5.1.x\spring-context\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.ws\jaxws-api\2.3.1\15e46dba25b1f767a3f517721badf6cce8dbb13d\jaxws-api-2.3.1.jar;E:\spring-framework-5.1.x\spring-aop\out\production\classes;E:\spring-framework-5.1.x\spring-beans\out\production\classes;E:\spring-framework-5.1.x\spring-core\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.projectreactor\reactor-core\3.2.13.RELEASE\179d059b0062391eb037774d0c3376168e1a99da\reactor-core-3.2.13.RELEASE.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-buffer\4.1.44.Final\8b2add255e68d0fcb8ccdfaf07399980d3be840f\netty-buffer-4.1.44.Final.jar;E:\spring-framework-5.1.x\spring-core\build\libs\spring-cglib-repack-3.2.11.jar;E:\spring-framework-5.1.x\spring-core\build\libs\spring-objenesis-repack-3.0.1.jar;E:\spring-framework-5.1.x\spring-jcl\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.11.2\f5e9a2ffca496057d6891a3de65128efc636e26e\log4j-api-2.11.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.28\2cd9b264f76e3d087ee21bfc99305928e1bdb443\slf4j-api-1.7.28.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sf.jopt-simple\jopt-simple\5.0.4\4fdac2fbe92dfad86aa6e9301736f6b4342a3f5c\jopt-simple-5.0.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.5\1740dc9140103b796d1722668805fd4cf852780c\aspectjweaver-1.9.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava-reactive-streams\1.2.1\dac56d021c092c34662943dae3ab1432542005\rxjava-reactive-streams-1.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava\1.3.8\8c192792ad2e65a90867ab418ac49703f44d2baf\rxjava-1.3.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.2.16\4b88484cd4d02954243fc0a1a0b0a7503ca769a0\rxjava-2.2.16.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.2.71\ba18ca1aa0e40eb6f1865b324af2f4cbb691c1ec\kotlin-stdlib-common-1.2.71.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.reactivestreams\reactive-streams\1.0.2\323964c36556eb0e6209f65c1cef72b53b461ab8\reactive-streams-1.0.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-common\4.1.44.Final\cd09d9093791482acdcbe8e39ad6fdf62ea3ab7d\netty-common-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-xml\2.5.8\4e1db8ac25be2d7e7fa33a21ff921744a8207598\groovy-xml-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.23\ec62d74fe50689c28c0ff5b35d3aebcaa8b5be68\snakeyaml-1.23.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy\2.5.8\2f1e8ea55e625fe51e85ef35eb067f1d9c61772d\groovy-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.jamonapi\jamon\2.81\e81ca9fe23ff737e00645b4387a262b2e7a1d9c2\jamon-2.81.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.hazelcast\hazelcast-all\3.2.5\db26813386b8d8b2d0909d9b4e6fbe6f6247f6c7\hazelcast-all-3.2.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-pool2\2.6.2\775a8072995b29eafe8fb0a828a190589f71cede\commons-pool2-2.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sourceforge.findbugs\annotations\1.3.2\d77bc83e0408680034a29481a89de0dba9802a97\annotations-1.3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.ejb\javax.ejb-api\3.2\6da48d715f67cd6ad55e96cc55030532d35062f1\javax.ejb-api-3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.hibernate\hibernate-validator\5.4.3.Final\7c3d91629e81937b33dffd5b170956ef9c76af97\hibernate-validator-5.4.3.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.bind\jaxb-api\2.3.1\8531ad5ac454cc2deb9d4d32c40c4d7451939b5d\jaxb-api-2.3.1.jar;E:\spring-framework-5.1.x\spring-expression\out\production\classes;E:\spring-framework-5.1.x\spring-instrument\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.annotation\javax.annotation-api\1.3.2\934c04d3cfef185a8008e7bf34331b79730a9d43\javax.annotation-api-1.3.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.enterprise.concurrent\javax.enterprise.concurrent-api\1.0\c392610c40aa3e0e7b57c47a1b561d4b3f974fac\javax.enterprise.concurrent-api-1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.interceptor\javax.interceptor-api\1.2.2\b076d5887ff19f7311fd70cbe03fa3d3d8628a8e\javax.interceptor-api-1.2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.money\money-api\1.0.3\d328418fdacc03001330fa5bc193367dcb853413\money-api-1.0.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.validation\validation-api\1.1.0.Final\8613ae82954779d518631e05daa73a6a954817d5\validation-api-1.1.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.beanshell\bsh\2.0b5\fdc2ab6ae8b53e0d4761b296c116df747cd85199\bsh-2.0b5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\joda-time\joda-time\2.10.5\7f1d89817cd20a32444d5ab4160f035ab9b864e7\joda-time-2.10.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.2\d81aff979d603edd90dcd8db2abc1f4ce6479e3e\javax.transaction-api-1.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.xml.soap\javax.xml.soap-api\1.4.0\667ef2eee594ca7e05a1cbe0b37a428f7b57778f\javax.xml.soap-api-1.4.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.3.0.Final\3616bb87707910296e2c195dc016287080bba5af\jboss-logging-3.3.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.3.1\2ad2fd09dcf5607ca96f8ef432096a96986c40a\classmate-1.3.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.activation\javax.activation-api\1.2.0\85262acf3ca9816f9537ca47d5adeabaead7cb16\javax.activation-api-1.2.0.jar;E:\spring-framework-5.1.x\spring-tx\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.resource\javax.resource-api\1.7.1\f86b4d697ecd992ec6c4c6053736db16d41dc57f\javax.resource-api-1.7.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.transaction\javax.transaction-api\1.3\e006adf5cf3cca2181d16bd640ecb80148ec0fce\javax.transaction-api-1.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.ibm.websphere\uow\6.0.2.17\df754f8fe0c9c6f837d00ddcc12632fef16ec239\uow-6.0.2.17.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.hsqldb\hsqldb\2.4.1\9daff99b4fbd6809fd46ab4327650ad00a1be6d4\hsqldb-2.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.h2database\h2\1.4.199\7bf08152984ed8859740ae3f97fae6c72771ae45\h2-1.4.199.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.derby\derby\10.14.2.0\7efad40ef52fbb1f08142f07a83b42d29e47d8ce\derby-10.14.2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.derby\derbyclient\10.14.2.0\fdd338d43e09bf7cd16f5523a0f717e5ef79a1a8\derbyclient-10.14.2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\net.sf.ehcache\ehcache\2.10.4\9022b1eedfafa11039597b1c1918c1abe414df93\ehcache-2.10.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.mail\javax.mail-api\1.6.2\17a8151bab44f9c94f34c10db70d95ba3c830eda\javax.mail-api-1.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.cache\cache-api\1.1.0\77bdcff7814076dfa61611b0db88487c515150b6\cache-api-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.ben-manes.caffeine\caffeine\2.6.2\c8fd8817f9d2b2ced82f8968e0dd943aab557de0\caffeine-2.6.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.fabric3.api\commonj\1.1.0\11e7a4fbf6c257e221df0aadf9851d8992fe60ff\commonj-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.freemarker\freemarker\2.3.28\7200064467a935052f99d114c2c05c3d189bc6d6\freemarker-2.3.28.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP-java6\2.3.13\376d13a7b2dc57379c550619fe02ecfe51e62465\HikariCP-java6-2.3.13.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.mchange\mchange-commons-java\0.2.11\2a6a6c1fe25f28f5a073171956ce6250813467ef\mchange-commons-java-0.2.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-mustache\1.0.7\9512741d0042ff6ff6227c4a7c378307f388bbd7\tiles-request-mustache-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-mvel\3.0.8\7538c448d25c86b11ffb8027009feacd5dbea5c8\tiles-mvel-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-ognl\3.0.8\138753498a27322b35eedfa808428fb24a97c2c2\tiles-ognl-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.velocity\velocity-tools\2.0\69936384de86857018b023a8c56ae0635c56b6a0\velocity-tools-2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi\4.1.1\c915f1a426213a8450fb473b5b3adb63f5ac1017\poi-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.spullara.mustache.java\compiler\0.8.4\371619789a3d6f75c9960dc50de0099b10342816\compiler-0.8.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-extras\3.0.8\4251303209066a9ac1a948d2badd19156b18d14b\tiles-extras-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-digester\commons-digester\2.0\3dbd8a76683cd563583a2c78c356ad8b8acf38bf\commons-digester-2.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-jsp\3.0.8\7465a65e4b3821a9785995bcb5ce2f74098ab023\tiles-jsp-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-xml\2.9.9\4b8a210f1102307ec66028f744a1ede73a40ed2d\jackson-dataformat-xml-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-servlet\3.0.8\56c7ed54e70912ef6628dca464a54a5ecac587b3\tiles-servlet-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-freemarker\3.0.8\2d00cb648984176c3072ac3b41369b02e5a50897\tiles-freemarker-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-api\3.0.8\a3c4f741b1cf5ce578b85155cf640a932f617167\tiles-api-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-template\3.0.8\70b396cce5516f7069d15398f07bb32c9020a5df\tiles-template-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.groovy\groovy-templates\2.5.8\85563c8b59182144862ff29cfa70d3d486860364\groovy-templates-2.5.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi-ooxml-schemas\4.1.1\7bb506f074a5bffce6b367f40ee0535fa7f73003\poi-ooxml-schemas-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.9.9\d6eb9817d9c7289a91f043ac5ee02a6b3cc86238\jackson-databind-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.poi\poi-ooxml\4.1.1\216d8bb4c064c3a1079e77d693cd60346dd63f38\poi-ooxml-4.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.librepdf\openpdf\1.2.21\299ac66b97c81e65a5995be1eebab18e581f8e41\openpdf-1.2.21.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-core\3.0.8\1f71d0545540ad4bd7b4d883b2ff763cffde237\tiles-core-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\12.0.1\b8e78b9af7bf45900e14c6f958486b6ca682195f\guava-12.0.1.jar;E:\spring-framework-5.1.x\spring-web\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport\4.1.44.Final\18a0ce8be8ca639982276efefc0a5604a6523d80\netty-transport-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-reactive-httpclient\1.0.3\2649ef74b389fa09194220b7f769970e4eaabcd9\jetty-reactive-httpclient-1.0.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java-util\3.6.1\35f62815e87c32b01bf1ed8c5aa3f9e33a08c2f3\protobuf-java-util-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.14.5\151ce36be627fa54e232bdce97a28ab52301b525\okhttp-3.14.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-http\9.4.25.v20191220\c3aa7da362f1a492667ce754ba16b2535b793668\jetty-http-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.rometools\rome\1.12.2\eaa7a2025cd38a6678d96b2b78b4f7e68e3f8e36\rome-1.12.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-servlet\9.4.25.v20191220\bee77d6a4f87dc90d5bc142cbd6cef470ec46aae\jetty-servlet-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.woodstox\woodstox-core\5.3.0\59a3a7fb46a364ee383ea7e8c67c152a224b3d99\woodstox-core-5.3.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.5.10\7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5\httpclient-4.5.10.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http\4.1.44.Final\6135c2b3a01e0e1ab4bd8bba89bdefe2d2b24a4c\netty-codec-http-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpasyncclient\4.1.4\f3a3240681faae3fa46b573a4c7e50cec9db0d86\httpasyncclient-4.1.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.synchronoss.cloud\nio-multipart-parser\1.1.0\c6c417fec6612584b1c34d4dd98c5a4e47e8c754\nio-multipart-parser-1.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport-native-epoll\4.1.44.Final\2b405e66f0237bc0e42251d4825bfa810fb60b68\netty-transport-native-epoll-4.1.44.Final-linux-x86_64.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\9.0.30\ad32909314fe2ba02cec036434c0addd19bcc580\tomcat-embed-core-9.0.30.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.undertow\undertow-core\2.0.29.Final\6837cd080712581779406f5b2c452afac6bc2e47\undertow-core-2.0.29.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler-proxy\4.1.44.Final\491c0997aa4b8b2e4bec41d1d50d211299f166a5\netty-handler-proxy-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-server\9.4.25.v20191220\5b352c9f9135a1c20e4808e5cb1d84fbddfdc460\jetty-server-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.projectreactor.netty\reactor-netty\0.8.14.RELEASE\8bd639f59fba24afbcd8abb93eaa57f96b2ad10b\reactor-netty-0.8.14.RELEASE.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-fileupload\commons-fileupload\1.4\f95188e3d372e20e7328706c37ef366e5d7859b0\commons-fileupload-1.4.jar;E:\spring-framework-5.1.x\spring-oxm\out\production\classes;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.castor\castor-xml\1.4.1\2cee800a008291305ac4f3a67b674f9c6cb1d07a\castor-xml-1.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jibx\jibx-run\1.3.1\823bdac9c1781c112b36dd853d77da510c29d1a3\jibx-run-1.3.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.castor\castor-core\1.4.1\b973333a7ce1b8017dccba68068023c9d17f9872\castor-core-1.4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.thoughtworks.xstream\xstream\1.4.11.1\6c120c45a8c480bb2fea5b56502e3993ddd74fd2\xstream-1.4.11.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-collections4\4.1\a4cf4688fe1c7e3a63aa636cc96d013af537768e\commons-collections4-4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\joda-time\joda-time\2.9.5\5f01da7306363fad2028b916f3eab926262de928\joda-time-2.9.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\xpp3\xpp3\1.1.3.4.O\1c165262edac1c1e4f0a67c1643c4b7476187034\xpp3-1.1.3.4.O.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\3.1.0\3cd63d075497751784b2fa84be59432f4905bf7c\javax.servlet-api-3.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet.jsp\javax.servlet.jsp-api\2.3.2-b02\287387015b38bb4fc5d5f085c938ab51bf82b00\javax.servlet.jsp-api-2.3.2-b02.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.el\javax.el-api\3.0.1-b04\8c0c970b8deae5054ff0bf4b17979c8181a506d3\javax.el-api-3.0.1-b04.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.faces\javax.faces-api\2.2\e314573935023b6151643e97e9629a2d9f6f604d\javax.faces-api-2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.json.bind\javax.json.bind-api\1.0\10332203cb05f4ab2e8bf058bfd7d99648c5ca68\javax.json.bind-api-1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.glassfish.main\javax.jws\4.0-b33\e95f8054a90a00fb02c3aa450ac0901b6ad8740e\javax.jws-4.0-b33.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-all\4.1.44.Final\1720921b2697d987117e111c8a23817bcacc7fdd\netty-all-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-security\9.4.25.v20191220\593ff5b5dfd5bf973184329f5d1209b9a411ec12\jetty-security-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml\aalto-xml\1.1.1\57f68eb93253802cb125af569fd81436cbae9c88\aalto-xml-1.1.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-jaxb-annotations\2.9.9\52fb643de81a60839750013a520f26b6259ddeff\jackson-module-jaxb-annotations-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-smile\2.9.9\85749406c69b08945d6059db679cc66990340ebc\jackson-dataformat-smile-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.dataformat\jackson-dataformat-cbor\2.9.9\3206f36ea2b0f9bd365a138338281243241dc9da\jackson-dataformat-cbor-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.5\f645ed69d595b24d4cf8b3fbb64cc505bede8829\gson-2.8.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.googlecode.protobuf-java-format\protobuf-java-format\1.4\b81e7d188c2cc766bc150bd3c77154178b3541d5\protobuf-java-format-1.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.caucho\hessian\4.0.51\29047eb08639a98e4b9437d7cbe81fb0471ba7\hessian-4.0.51.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-http2\4.1.44.Final\84fd396e814af4278595e50f8c5089056771d19a\netty-codec-http2-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-handler\4.1.44.Final\c82cfba4ff7b79f3e7828c4ccbfebb756603cc8c\netty-handler-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.4.0.Final\b225692a59f7dc3a789d2c85edc06041914e97e7\jboss-logging-3.4.0.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.xnio\xnio-nio\3.3.8.Final\8dafaf230666e526c53e544ab6a9d6ecfcbab4ee\xnio-nio-3.3.8.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jboss.xnio\xnio-api\3.3.8.Final\7942ba8330c91a12006c912e040d25a77a58c525\xnio-api-3.3.8.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat\tomcat-annotations-api\9.0.30\69e405494339f1a06097fbddbd93164dbf8bddaf\tomcat-annotations-api-9.0.30.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-client\9.4.25.v20191220\a845f43d3b5bb457866a8e0c2f728c388e181a0a\jetty-client-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-io\9.4.25.v20191220\3eb34b5481012701de0ea9dfaf2bdf1dbb947b16\jetty-io-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.synchronoss.cloud\nio-stream-storage\1.1.3\986dba5f6e5eed20f0dba6ddc8e8a64a9ebdc2f3\nio-stream-storage-1.1.3.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.rometools\rome-utils\1.12.2\240dc40fb9333ac872319e7d31178bffc63f7900\rome-utils-1.12.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.17.2\78c7820b205002da4d2d137f6f312bd64b3d6049\okio-1.17.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore-nio\4.4.10\486f90c2af9bb81c51e8fb905647267053d5441\httpcore-nio-4.4.10.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.4.12\21ebaf6d532bc350ba95bd81938fa5f0e511c132\httpcore-4.4.12.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.11\3acb4705652e16236558f0f4f2192cc33c3bd189\commons-codec-1.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.2\83b5b8a7ba1c08f9e8c8ff2373724e33d3c1e22a\commons-io-2.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.woodstox\stax2-api\4.2\13c2b30926bca0429c704c4b4ca0b5d0432b69cd\stax2-api-4.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.9.0\7c10d545325e3a6e72e06381afe469fd40eb701\jackson-annotations-2.9.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.9.9\bfff5af9fb8347d26bbb7959cb9b4fe9a2b0ca5e\jackson-core-2.9.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\3.6.1\d06d46ecfd92ec6d0f3b423b4cd81cb38d8b924\protobuf-java-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\19.0\6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9\guava-19.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.jdom\jdom2\2.0.6\6f14738ec2e9dd0011e343717fa624a10f8aab64\jdom2-2.0.6.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec-socks\4.1.44.Final\d8ca370a3ddd9440368cf02b93896557ec13459\netty-codec-socks-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-codec\4.1.44.Final\4d759f5015a240a0635c59ce7acced9a364836d\netty-codec-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-transport-native-unix-common\4.1.44.Final\1af95c8d95aa55038d889944f709fa75efa94094\netty-transport-native-unix-common-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\io.netty\netty-resolver\4.1.44.Final\c644d209302d3fc7770dc0ca257e9f6fe8b38e47\netty-resolver-4.1.44.Final.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jetty\jetty-util\9.4.25.v20191220\fd8b642cc16728f1c36ca6a64653cb1b26ec0232\jetty-util-9.4.25.v20191220.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.webjars\webjars-locator-core\0.37\cc422f6cceec523b52d0abc6cff42e3f22d3d2ca\webjars-locator-core-0.37.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet\javax.servlet-api\4.0.1\a27082684a2ff0bf397666c3943496c44541d1ca\javax.servlet-api-4.0.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\javax.servlet.jsp.jstl\javax.servlet.jsp.jstl-api\1.2.1\f072f63ab1689e885ac40c221df3e6bb3e64a84a\javax.servlet.jsp.jstl-api-1.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-freemarker\1.0.7\cf75182100f643bf32e063c83dc1d8e0bfc258b7\tiles-request-freemarker-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-compat\3.0.8\8890ecc25134919e03a4f15b41e83ee5335f7beb\tiles-compat-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-el\3.0.8\d006d8201c7d9cee6c679ef0b0911ce35ced9187\tiles-el-3.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-jsp\1.0.7\6a9bde44749334e9ef85d0bdf854ff20641c113\tiles-request-jsp-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-servlet-wildcard\1.0.7\2b151fbe0d3c4b0d3cd6b804b30002a878189b74\tiles-request-servlet-wildcard-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-velocity\1.0.7\a79b6608238a31ee8b3ffabff824daed7df5251c\tiles-request-velocity-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-servlet\1.0.7\e9b9e3cda2a489b3292ed3a15a558b2b57ad0940\tiles-request-servlet-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-request-api\1.0.7\c649a9be6df263c888a2195447cd602d530cc233\tiles-request-api-1.0.7.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.8.1\6505a72a097d9270f7a9e7bf42c4238283247755\commons-lang3-3.8.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.19\7e65777fb451ddab6a9c054beb879e521b7eab78\commons-compress-1.19.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.albfernandez\juniversalchardet\2.3.0\48441094fd92f5eb5d60ab0193a76151ebd48633\juniversalchardet-2.3.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.github.virtuald\curvesapi\1.06\159dd2e8956459a4eb0a9a6ecda9004d8d289708\curvesapi-1.06.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.fasterxml.woodstox\woodstox-core\5.1.0\bd416e84cbd20cb5f2cf13c30b023e814a4d6107\woodstox-core-5.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.codehaus.woodstox\stax2-api\4.1\b6e20f3760016b70358e9227be904ecb26a50530\stax2-api-4.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.13\3f18e1aa31031d89db6f01ba05d501258ce69d2c\commons-codec-1.13.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-collections4\4.4\62ebe7544cb7164d87e0637a2a6a2bdc981395e8\commons-collections4-4.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-math3\3.6.1\e4ba98f1d4b3c80ec46392f25e094a6a2e58fcbf\commons-math3-3.6.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.xmlbeans\xmlbeans\3.1.0\6dac1f897dfb3e3f17fc79b18a3353b2e51c464e\xmlbeans-3.1.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-beanutils\commons-beanutils\1.8.0\c651d5103c649c12b20d53731643e5fffceb536\commons-beanutils-1.8.0.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tiles\tiles-autotag-core-runtime\1.2\100bd3cae1a5debf9afb4ef5c8b36c508d06326\tiles-autotag-core-runtime-1.2.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.mvel\mvel2\2.0.11\14bb21dabd899d2e60d9c0d008f267ed0d6c9ea8\mvel2-2.0.11.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\1.3.9\40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf\jsr305-1.3.9.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-collections\commons-collections\3.2.1\761ea405b9b37ced573d2df0d1e3a4e0f9edc668\commons-collections-3.2.1.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\oro\oro\2.0.8\5592374f834645c4ae250f4c9fbb314c9369d698\oro-2.0.8.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\jboss\javassist\3.7.ga\6d271a67a1d8718bfb225ace5a25f1c09427c9f8\javassist-3.7.ga.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\commons-lang\commons-lang\2.4\16313e02a793435009f1e458fa4af5d879f6fb11\commons-lang-2.4.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-jasper\8.5.5\4dba14bb5d4d68460461285ecb60e57668b154f\tomcat-embed-jasper-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\8.5.5\d55e12a418ff99ecd723a118c2a28bb91079972d\tomcat-embed-core-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\8.5.5\54bd595afa6e4fd141c70fb2d1cecacf4bd11e53\tomcat-embed-el-8.5.5.jar;C:\Users\Administrator\.gradle\caches\modules-2\files-2.1\org.eclipse.jdt.core.compiler\ecj\4.5.1\bee1367ac12fb6a20b422ff8711ebeb4f0a42316\ecj-4.5.1.jar" Test
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mutipleConstructs' defined in file [E:\spring-framework-5.1.x\qitian0-Test\out\production\classes\com\MutipleConstructs.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.Integer' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:787)
  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:236)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1360)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1202)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:559)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518)
  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:321)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:319)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:848)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:892)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:556)
  at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:100)
  at Test.main(Test.java:10)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.Integer' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1664)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1222)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1176)
  at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:875)
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:778)
  ... 14 more

Process finished with exit code 1

这里的异常信息就不一样了,我们再看下debug信息

springboot无参构造器方法 spring 有参构造器注解_springboot无参构造器方法

可以看到这里的决策已经有结果了,而这里返回的结果信息就是我们定义的那个有参构造器,我们跟进去,然后最跟踪到

springboot无参构造器方法 spring 有参构造器注解_spring_02

再进入

springboot无参构造器方法 spring 有参构造器注解_spring_03

我们把代码贴出来,可以看到这个代码很长很长,相信读者也没有耐心看完,我就长话短说了

public BeanWrapper autowireConstructor(String beanName, RootBeanDefinition mbd,
      @Nullable Constructor<?>[] chosenCtors, @Nullable Object[] explicitArgs) {

    BeanWrapperImpl bw = new BeanWrapperImpl();
    this.beanFactory.initBeanWrapper(bw);
    //constructorToUse 要使用的构造方法,argsHolderToUse要使用的参数,拿到这些就可以创建bean了
    Constructor<?> constructorToUse = null;
    ArgumentsHolder argsHolderToUse = null;
    Object[] argsToUse = null;
        //如果确认了构造的参数,直接设置
    if (explicitArgs != null) {
      argsToUse = explicitArgs;
    }
    else {
      Object[] argsToResolve = null;
      synchronized (mbd.constructorArgumentLock) {
        constructorToUse = (Constructor<?>) mbd.resolvedConstructorOrFactoryMethod;
        if (constructorToUse != null && mbd.constructorArgumentsResolved) {
          // Found a cached constructor...
          argsToUse = mbd.resolvedConstructorArguments;
          if (argsToUse == null) {
            argsToResolve = mbd.preparedConstructorArguments;
          }
        }
      }
      if (argsToResolve != null) {
        argsToUse = resolvePreparedArguments(beanName, mbd, bw, constructorToUse, argsToResolve, true);
      }
    }

    if (constructorToUse == null || argsToUse == null) {
      // 上面是尝试从mbd.resolvedConstructorOrFactoryMethod拿一次,看能不能拿到,如果拿不到,就从参数拿
      Constructor<?>[] candidates = chosenCtors;
      //如果candidates为空,spring会认为自己判断有误,否认自己之前拿到构造器的模式,
      // 进行更加严谨的方式去重新拿构造方法
      if (candidates == null) {
        Class<?> beanClass = mbd.getBeanClass();
        try {
          candidates = (mbd.isNonPublicAccessAllowed() ?
              beanClass.getDeclaredConstructors() : beanClass.getConstructors());
        }
        catch (Throwable ex) {
          throw new BeanCreationException(mbd.getResourceDescription(), beanName,
              "Resolution of declared constructors on bean Class [" + beanClass.getName() +
              "] from ClassLoader [" + beanClass.getClassLoader() + "] failed", ex);
        }
      }
            //如果candidates.length == 1,表示spring已经确认了构造函数,这里并没有拿到具体的值,所以Spring会判断是不是无参构造处理,如果是就返回
      if (candidates.length == 1 && explicitArgs == null && !mbd.hasConstructorArgumentValues()) {
        Constructor<?> uniqueCandidate = candidates[0];
        if (uniqueCandidate.getParameterCount() == 0) {
          synchronized (mbd.constructorArgumentLock) {
            mbd.resolvedConstructorOrFactoryMethod = uniqueCandidate;
            mbd.constructorArgumentsResolved = true;
            mbd.resolvedConstructorArguments = EMPTY_ARGS;
          }
          bw.setBeanInstance(instantiate(beanName, mbd, uniqueCandidate, EMPTY_ARGS));
          return bw;
        }
      }



      boolean autowiring = (chosenCtors != null ||
          mbd.getResolvedAutowireMode() == AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR);
      ConstructorArgumentValues resolvedValues = null;
            //最小参数
      int minNrOfArgs;
      if (explicitArgs != null) {
        minNrOfArgs = explicitArgs.length;
      }
      else {
        //这里有Map也有List,表示可能会采用两种方式,比如会设置有序的就采用map
        //这里的cargs是用来装程序员配置的参数
        /*if(beanName.equals("user1")){
          mbd.getConstructorArgumentValues().addGenericArgumentValue("1","dsadasdsa");
        }*/
        ConstructorArgumentValues cargs = mbd.getConstructorArgumentValues();
        //这里的resolvedValues是用来合并两种参数
        resolvedValues = new ConstructorArgumentValues();
        //这里是spring获取对构造方法设置的最小参数
        //比如通过Spring的后置处理器使用(bd.getConstructorArgumentValues().addGenericArgumentValue)
        //参考MyImportBeanDefinitionRegistrar这个类
        minNrOfArgs = resolveConstructorArguments(beanName, mbd, bw, cargs, resolvedValues);
      }
            //这里的排序是对配合后面对参数选举的铺垫
      AutowireUtils.sortConstructors(candidates);
      //定义一个最大值
      int minTypeDiffWeight = Integer.MAX_VALUE;
      //存放需要排除的构造器
      Set<Constructor<?>> ambiguousConstructors = null;
      LinkedList<UnsatisfiedDependencyException> causes = null;
            //循环构造器
      for (Constructor<?> candidate : candidates) {
        Class<?>[] paramTypes = candidate.getParameterTypes();
                //当constructorToUse != null成立的时候会有这个argsToUse.length > paramTypes.length,这里就要回到排序了
        //排序后参数会3-》2-》1这样排序,如果有了3,来了一个2比较,那么spring就会认为不需要再进行处理了
        if (constructorToUse != null && argsToUse != null && argsToUse.length > paramTypes.length) {
          // Already found greedy constructor that can be satisfied ->
          // do not look any further, there are only less greedy constructors left.
          break;
        }
        // 这里的判断很重要,minNrOfArgs = resolveConstructorArguments(beanName, mbd, bw, cargs, resolvedValues);
        // 判断是如果这个构造方法的参数比我们对spring设置的参数还小,那么肯定是有问题的,会直接跳过
        if (paramTypes.length < minNrOfArgs) {
          continue;
        }

        ArgumentsHolder argsHolder;
        if (resolvedValues != null) {
          try {
            String[] paramNames = ConstructorPropertiesChecker.evaluate(candidate, paramTypes.length);
            if (paramNames == null) {
              ParameterNameDiscoverer pnd = this.beanFactory.getParameterNameDiscoverer();
              if (pnd != null) {
                paramNames = pnd.getParameterNames(candidate);
              }
            }
            //这里如果拿不到resolvedValues的值,spring会找不到匹配的类来对应,就会抛出异常
            argsHolder = createArgumentArray(beanName, mbd, resolvedValues, bw, paramTypes, paramNames,
                getUserDeclaredConstructor(candidate), autowiring, candidates.length == 1);
          }
          catch (UnsatisfiedDependencyException ex) {
            if (logger.isTraceEnabled()) {
              logger.trace("Ignoring constructor [" + candidate + "] of bean '" + beanName + "': " + ex);
            }
            // Swallow and try next constructor.
            if (causes == null) {
              causes = new LinkedList<>();
            }
            causes.add(ex);
            continue;
          }
        }
        else {
          // Explicit arguments given -> arguments length must match exactly.
          if (paramTypes.length != explicitArgs.length) {
            continue;
          }
          argsHolder = new ArgumentsHolder(explicitArgs);
        }

        int typeDiffWeight = (mbd.isLenientConstructorResolution() ?
            argsHolder.getTypeDifferenceWeight(paramTypes) : argsHolder.getAssignabilityWeight(paramTypes));
        // Choose this constructor if it represents the closest match.
        if (typeDiffWeight < minTypeDiffWeight) {
          constructorToUse = candidate;
          argsHolderToUse = argsHolder;
          argsToUse = argsHolder.arguments;
          minTypeDiffWeight = typeDiffWeight;
          ambiguousConstructors = null;
        }
        else if (constructorToUse != null && typeDiffWeight == minTypeDiffWeight) {
          if (ambiguousConstructors == null) {
            ambiguousConstructors = new LinkedHashSet<>();
            ambiguousConstructors.add(constructorToUse);
          }
          ambiguousConstructors.add(candidate);
        }
      }

      if (constructorToUse == null) {
        if (causes != null) {
          UnsatisfiedDependencyException ex = causes.removeLast();
          for (Exception cause : causes) {
            this.beanFactory.onSuppressedException(cause);
          }
          throw ex;
        }
        throw new BeanCreationException(mbd.getResourceDescription(), beanName,
            "Could not resolve matching constructor " +
            "(hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)");
      }
      else if (ambiguousConstructors != null && !mbd.isLenientConstructorResolution()) {
        throw new BeanCreationException(mbd.getResourceDescription(), beanName,
            "Ambiguous constructor matches found in bean '" + beanName + "' " +
            "(hint: specify index/type/name arguments for simple parameters to avoid type ambiguities): " +
            ambiguousConstructors);
      }

      if (explicitArgs == null && argsHolderToUse != null) {
        argsHolderToUse.storeCache(mbd, constructorToUse);
      }
    }

    Assert.state(argsToUse != null, "Unresolved constructor arguments");
    bw.setBeanInstance(instantiate(beanName, mbd, constructorToUse, argsToUse));
    return bw;
  }

我们记住这里我们已经获取了有参构造器,那么是不是要根据有参构造器来执行对象创建了?没错,那么既然确定了构造器,那我们还缺少什么?参数是吧,那么我们就应该确定参数的值是多少,那么Spring从哪里获取的参数值呢?注意是参数值是指参数的具体值

springboot无参构造器方法 spring 有参构造器注解_springboot无参构造器方法_04

我们可以很清晰的看到,这里就是获取参数的值,这里笔者还修改了做验证,笔者也可以尝试,其实就对ConstructorArgumentValues进行赋值和取值,这里笔者在spring-myabtis的章节做了非常详细的介绍,在看后面的代码

springboot无参构造器方法 spring 有参构造器注解_Java_05

这里是正对多种情况,如果前面的构造器策略返回的是多个构造器,这里就会再次确认,并且做一个排序,从参数多的构造器进行校验,看是不是符合,如果不符合就不再校验。最后

springboot无参构造器方法 spring 有参构造器注解_jar_06

如果构造器确认了,但是没有获取参数的值,就会抛出我们上文提的异常

Unsatisfied dependency expressed through constructor parameter 0;

当然这段代码还不止这些东西,后面还定义了最大值还进行赋值等等,但核心思想就是笔者前面所提及的内容了,OK,本章就算是对SpringIOC源码的关门章节了,愿我们每天都能进步一点点。