• 问题springboot项目启动报错


    "C:Program FilesJavajdk1.8.0_91injava" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=13847 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:Program FilesideaIU-2018.1.winlibidea_rt.jar=13848:D:Program FilesideaIU-2018.1.winin" -Dfile.encoding=UTF-8 -classpath "C:Program FilesJavajdk1.8.0_91jrelibcharsets.jar;C:Program FilesJavajdk1.8.0_91jrelibdeploy.jar;C:Program FilesJavajdk1.8.0_91jrelibextaccess-bridge-64.jar;C:Program FilesJavajdk1.8.0_91jrelibextcldrdata.jar;C:Program FilesJavajdk1.8.0_91jrelibextdnsns.jar;C:Program FilesJavajdk1.8.0_91jrelibextjaccess.jar;C:Program FilesJavajdk1.8.0_91jrelibextjfxrt.jar;C:Program FilesJavajdk1.8.0_91jrelibextlocaledata.jar;C:Program FilesJavajdk1.8.0_91jrelibext ashorn.jar;C:Program FilesJavajdk1.8.0_91jrelibextsunec.jar;C:Program FilesJavajdk1.8.0_91jrelibextsunjce_provider.jar;C:Program FilesJavajdk1.8.0_91jrelibextsunmscapi.jar;C:Program FilesJavajdk1.8.0_91jrelibextsunpkcs11.jar;C:Program FilesJavajdk1.8.0_91jrelibextzipfs.jar;C:Program FilesJavajdk1.8.0_91jrelibjavaws.jar;C:Program FilesJavajdk1.8.0_91jrelibjce.jar;C:Program FilesJavajdk1.8.0_91jrelibjfr.jar;C:Program FilesJavajdk1.8.0_91jrelibjfxswt.jar;C:Program FilesJavajdk1.8.0_91jrelibjsse.jar;C:Program FilesJavajdk1.8.0_91jrelibmanagement-agent.jar;C:Program FilesJavajdk1.8.0_91jrelibplugin.jar;C:Program FilesJavajdk1.8.0_91jrelib esources.jar;C:Program FilesJavajdk1.8.0_91jrelib t.jar;E:workspacespringboot courses8-mybatis2 argetclasses;D:Program Filesapache-maven-3.5.0.m2 epositoryorgmybatisspringootmybatis-spring-boot-starter1.3.2mybatis-spring-boot-starter-1.3.2.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-starter2.4.9spring-boot-starter-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot2.4.9spring-boot-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-autoconfigure2.4.9spring-boot-autoconfigure-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-starter-logging2.4.9spring-boot-starter-logging-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositorychqoslogbacklogback-classic1.2.4logback-classic-1.2.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositorychqoslogbacklogback-core1.2.4logback-core-1.2.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapachelogginglog4jlog4j-to-slf4j2.13.3log4j-to-slf4j-2.13.3.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapachelogginglog4jlog4j-api2.13.3log4j-api-2.13.3.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgslf4jjul-to-slf4j1.7.32jul-to-slf4j-1.7.32.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryjakartaannotationjakarta.annotation-api1.3.5jakarta.annotation-api-1.3.5.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgyamlsnakeyaml1.27snakeyaml-1.27.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-starter-jdbc2.4.9spring-boot-starter-jdbc-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomzaxxerHikariCP3.4.5HikariCP-3.4.5.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-jdbc5.3.9spring-jdbc-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-tx5.3.9spring-tx-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgmybatisspringootmybatis-spring-boot-autoconfigure1.3.2mybatis-spring-boot-autoconfigure-1.3.2.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgmybatismybatis3.4.6mybatis-3.4.6.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgmybatismybatis-spring1.3.2mybatis-spring-1.3.2.jar;D:Program Filesapache-maven-3.5.0.m2 epositorymysqlmysql-connector-java5.1.47mysql-connector-java-5.1.47.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomalibabadruid1.1.12druid-1.1.12.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgprojectlomboklombok1.18.20lombok-1.18.20.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapache omcatembed omcat-embed-jasper9.0.50 omcat-embed-jasper-9.0.50.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapache omcatembed omcat-embed-core9.0.50 omcat-embed-core-9.0.50.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapache omcat omcat-annotations-api9.0.50 omcat-annotations-api-9.0.50.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapache omcatembed omcat-embed-el9.0.50 omcat-embed-el-9.0.50.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgeclipsejdtecj3.18.0ecj-3.18.0.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-starter-web2.4.9spring-boot-starter-web-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-starter-json2.4.9spring-boot-starter-json-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomfasterxmljacksoncorejackson-databind2.11.4jackson-databind-2.11.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomfasterxmljacksoncorejackson-annotations2.11.4jackson-annotations-2.11.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomfasterxmljacksoncorejackson-core2.11.4jackson-core-2.11.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomfasterxmljacksondatatypejackson-datatype-jdk82.11.4jackson-datatype-jdk8-2.11.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomfasterxmljacksondatatypejackson-datatype-jsr3102.11.4jackson-datatype-jsr310-2.11.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositorycomfasterxmljacksonmodulejackson-module-parameter-names2.11.4jackson-module-parameter-names-2.11.4.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkootspring-boot-starter-tomcat2.4.9spring-boot-starter-tomcat-2.4.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgglassfishjakarta.el3.0.3jakarta.el-3.0.3.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgapache omcatembed omcat-embed-websocket9.0.50 omcat-embed-websocket-9.0.50.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-web5.3.9spring-web-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-beans5.3.9spring-beans-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-webmvc5.3.9spring-webmvc-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-aop5.3.9spring-aop-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-context5.3.9spring-context-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-expression5.3.9spring-expression-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgslf4jslf4j-api1.7.32slf4j-api-1.7.32.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-core5.3.9spring-core-5.3.9.jar;D:Program Filesapache-maven-3.5.0.m2 epositoryorgspringframeworkspring-jcl5.3.9spring-jcl-5.3.9.jar" com.abc.Application

    . ____ _ __ _ _
    / / ' __ _ () __ __ _
    ( ( )_
    _ | '_ | '| | ' / ` |
    / )| |)| | | | | || (| | ) ) ) )
    ' |
    | .__|| ||| |__, | / / / /
    =|_|======|/=////
    :: Spring Boot :: (v2.4.9)

    2021-10-10 15:10:34.136 INFO 1140 --- [ main] com.abc.Application : Starting Application using Java 1.8.0_91 on dp071708004 with PID 1140 (E:workspacespringboot courses8-mybatis2 argetclasses started by dphudy in E:workspacespringboot courses)
    2021-10-10 15:10:34.140 INFO 1140 --- [ main] com.abc.Application : No active profile set, falling back to default profiles: default
    2021-10-10 15:10:35.224 INFO 1140 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8899 (http)
    2021-10-10 15:10:35.233 INFO 1140 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
    2021-10-10 15:10:35.233 INFO 1140 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.50]
    2021-10-10 15:10:35.460 INFO 1140 --- [ main] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    2021-10-10 15:10:35.462 INFO 1140 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/xxx] : Initializing Spring embedded WebApplicationContext
    2021-10-10 15:10:35.463 INFO 1140 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1269 ms
    2021-10-10 15:10:35.725 WARN 1140 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'someController': Unsatisfied dependency expressed through field 'studentService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentServiceImpl': Unsatisfied dependency expressed through field 'studentDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentDao' defined in file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    2021-10-10 15:10:35.727 INFO 1140 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
    2021-10-10 15:10:35.747 INFO 1140 --- [ main] ConditionEvaluationReportLoggingListener :

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    2021-10-10 15:10:35.769 ERROR 1140 --- [ main] o.s.boot.SpringApplication : Application run failed

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'someController': Unsatisfied dependency expressed through field 'studentService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentServiceImpl': Unsatisfied dependency expressed through field 'studentDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentDao' defined in file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.9.jar:5.3.9]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.9.jar:5.3.9]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.9.jar:2.4.9]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771) [spring-boot-2.4.9.jar:2.4.9]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763) [spring-boot-2.4.9.jar:2.4.9]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) [spring-boot-2.4.9.jar:2.4.9]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:339) [spring-boot-2.4.9.jar:2.4.9]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) [spring-boot-2.4.9.jar:2.4.9]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1318) [spring-boot-2.4.9.jar:2.4.9]
    at com.abc.Application.main(Application.java:15) [classes/:na]
    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentServiceImpl': Unsatisfied dependency expressed through field 'studentDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentDao' defined in file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.9.jar:5.3.9]
    ... 21 common frames omitted
    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentDao' defined in file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1516) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1399) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ~[spring-beans-5.3.9.jar:5.3.9]
    ... 35 common frames omitted
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1501) ~[spring-beans-5.3.9.jar:5.3.9]
    ... 46 common frames omitted
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.9.jar:5.3.9]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.9.jar:5.3.9]
    ... 59 common frames omitted
    Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:523) ~[mybatis-spring-1.3.2.jar:1.3.2]
    at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:380) ~[mybatis-spring-1.3.2.jar:1.3.2]
    at org.mybatis.spring.SqlSessionFactoryBean.getObject(SqlSessionFactoryBean.java:547) ~[mybatis-spring-1.3.2.jar:1.3.2]
    at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.sqlSessionFactory(MybatisAutoConfiguration.java:153) ~[mybatis-spring-boot-autoconfigure-1.3.2.jar:1.3.2]
    at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$1e9da31.CGLIB$sqlSessionFactory$0() ~[mybatis-spring-boot-autoconfigure-1.3.2.jar:1.3.2]
    at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$1e9da31$$FastClassBySpringCGLIB$$9c9b3d92.invoke() ~[mybatis-spring-boot-autoconfigure-1.3.2.jar:1.3.2]
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.9.jar:5.3.9]
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.9.jar:5.3.9]
    at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$1e9da31.sqlSessionFactory() ~[mybatis-spring-boot-autoconfigure-1.3.2.jar:1.3.2]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.9.jar:5.3.9]
    ... 60 common frames omitted
    Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [E:workspacespringboot courses8-mybatis2 argetclassescomabcdaoStudentDao.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92) ~[mybatis-3.4.6.jar:3.4.6]
    at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:521) ~[mybatis-spring-1.3.2.jar:1.3.2]
    ... 73 common frames omitted
    Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:74) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:135) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:118) ~[mybatis-3.4.6.jar:3.4.6]
    ... 75 common frames omitted
    Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Studnet'. Cause: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116) ~[mybatis-3.4.6.jar:3.4.6]
    ... 79 common frames omitted
    Caused by: java.lang.ClassNotFoundException: Cannot find class: Studnet
    at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:200) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.io.Resources.classForName(Resources.java:261) ~[mybatis-3.4.6.jar:3.4.6]
    at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116) ~[mybatis-3.4.6.jar:3.4.6]
    ... 81 common frames omitted

    Process finished with exit code 1

        <select id="selectStudentById" resultType="Student">
            select id, name, age from student where id=#{xxx}
        </select>
    Student改为权限地名就正常了
    

    作者: 燃烧的竹子
    出处: https://www.cnblogs.com/HittheRoad/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
  • 相关阅读:
    论云端智能相册应用的架构设计及应用
    《架构漫谈》阅读笔记02
    论软件体系架构之质量属性
    《架构漫谈》阅读笔记01
    tensorflow-gpu:Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found
    tensorflow线性回归
    【阿里巴巴国际站】22届实习生招聘开始啦!
    vue-ref、js获取dom子元素
    echarts地图tooltip添加标注
    echarts 图表坐标axisLabel格式化文字
  • 原文地址:https://www.cnblogs.com/HittheRoad/p/15389520.html
Copyright © 2020-2023  润新知