哪里出错?
来源:3-5 数据访问层搭建—集成Druid连接池

慕函数1054313
2019-04-29
Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled.
2019-04-29 14:31:40.557 ERROR 10268 — [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userController’: Unsatisfied dependency expressed through field ‘userService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userService’: Unsatisfied dependency expressed through field ‘userMapper’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userMapper’ defined in file [F:\STS\house\house\target\classes\com\house\house\mapper\UserMapper.class]: Unsatisfied dependency expressed through bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘sqlSessionFactory’ parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [com/house/house/config/DruidConfig.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
1回答
-
格鲁
2019-05-01
出现了空指针,druidconfig,确定你引入了mysql的驱动包
012019-05-07
相似问题