Error creating bean with name ‘xxx‘: Unsatisfied dependency expressed through field ‘xxx‘
Application startup failed
.UnsatisfiedDependencyException: Error creating bean with name 'loginController': Unsatisfied dependency expressed through field 'loginService'; nested exception is .UnsatisfiedDependencyException: Error creating bean with name 'loginService': Unsatisfied dependency expressed through field 'loginMapper'; nested exception is .UnsatisfiedDependencyException: Error creating bean with name 'loginMapper' defined in file [target\classes\tk\mybatis\springboot\mapper\]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is .BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/]: Bean instantiation via factory method failed; nested exception is .BeanInstantiationException: Failed to instantiate []: Factory method 'sqlSessionFactory' threw exception; nested exception is .StringIndexOutOfBoundsException: String index out of range: -75
at $AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3..jar:4.3.]
at .inject(InjectionMetadata.java:88) ~[spring-beans-4.3..jar:4.3.]
at .postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3..jar:4.3.]
at .populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3..jar:4.3.]
at .doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3..jar:4.3.]
at .createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3..jar:4.3.]
at $1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3..jar:4.3.]
at .getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3..jar:4.3.]
at .doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3..jar:4.3.]
at .getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3..jar:4.3.]
at .preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3..jar:4.3.]
at .finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3..jar:4.3.]
at .refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3..jar:4.3.]
at .refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5..jar:1.5.]
at .refresh(SpringApplication.java:693) [spring-boot-1.5..jar:1.5.]
at .refreshContext(SpringApplication.java:360) [spring-boot-1.5..jar:1.5.]
at .run(SpringApplication.java:303) [spring-boot-1.5..jar:1.5.]
at .run(SpringApplication.java:1118) [spring-boot-1.5..jar:1.5.]
at .run(SpringApplication.java:1107) [spring-boot-1.5..jar:1.5.]
at .main(Application.java:29) [classes/:na]
at .invoke0(Native Method) ~[na:1.8.0_111]
at .invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
at .invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at .invoke(Method.java:498) ~[na:1.8.0_111]
at .run(RestartLauncher.java:49) [spring-boot-devtools-1.5..jar:1.5.]
Caused by: .UnsatisfiedDependencyException: Error creating bean with name 'loginService': Unsatisfied dependency expressed through field 'loginMapper'; nested exception is .UnsatisfiedDependencyException: Error creating bean with name 'loginMapper' defined in file [\target\classes\tk\mybatis\springboot\mapper\]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is .BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/]: Bean instantiation via factory method failed; nested exception is .BeanInstantiationException: Failed to instantiate []: Factory method 'sqlSessionFactory' threw exception; nested exception is .StringIndexOutOfBoundsException: String index out of range: -75
at $AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3..jar:4.3.]
at .inject(InjectionMetadata.java:88) ~[spring-beans-4.3..jar:4.3.]
at .postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3..jar:4.3.]
at .populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3..jar:4.3.]
at .doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3..jar:4.3.]
at .createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3..jar:4.3.]
at $1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3..jar:4.3.]
at .getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3..jar:4.3.]
at .doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3..jar:4.3.]
at .getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3..jar:4.3.]
at .resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3..jar:4.3.]
at .doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3..jar:4.3.]
at .resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3..jar:4.3.]
at $AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3..jar:4.3.]
... 24 common frames omitted
Caused by: .UnsatisfiedDependencyException: Error creating bean with name 'loginMapper' defined in file [\target\classes\tk\mybatis\springboot\mapper\]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is .BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/]: Bean instantiation via factory method failed; nested exception is .BeanInstantiationException: Failed to instantiate []: Factory method 'sqlSessionFactory' threw exception; nested exception is .StringIndexOutOfBoundsException: String index out of range: -75
at .autowireByType(AbstractAutowireCapableBeanFactory.java:1357) ~[spring-beans-4.3..jar:4.3.]
at .populateBean(AbstractAutowireCapableBeanFactory.java:1249) ~[spring-beans-4.3..jar:4.3.]
at .doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3..jar:4.3.]
at .createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3..jar:4.3.]
at $1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3..jar:4.3.]
at .getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3..jar:4.3.]
at .doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3..jar:4.3.]
at .getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3..jar:4.3.]
at .resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3..jar:4.3.]
at .doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3..jar:4.3.]
at .resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3..jar:4.3.]
at $AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3..jar:4.3.]
... 37 common frames omitted
Caused by: .BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/]: Bean instantiation via factory method failed; nested exception is .BeanInstantiationException: Failed to instantiate []: Factory method 'sqlSessionFactory' threw exception; nested exception is .StringIndexOutOfBoundsException: String index out of range: -75
at .instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3..jar:4.3.]
at .instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3..jar:4.3.]
at .createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3..jar:4.3.]
at .doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3..jar:4.3.]
at .createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3..jar:4.3.]
at $1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3..jar:4.3.]
at .getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3..jar:4.3.]
at .doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3..jar:4.3.]
at .getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3..jar:4.3.]
at .resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3..jar:4.3.]
at .doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3..jar:4.3.]
at .resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3..jar:4.3.]
at .autowireByType(AbstractAutowireCapableBeanFactory.java:1342) ~[spring-beans-4.3..jar:4.3.]
... 48 common frames omitted
Caused by: .BeanInstantiationException: Failed to instantiate []: Factory method 'sqlSessionFactory' threw exception; nested exception is .StringIndexOutOfBoundsException: String index out of range: -75
at .instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3..jar:4.3.]
at .instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3..jar:4.3.]
... 60 common frames omitted
Caused by: .StringIndexOutOfBoundsException: String index out of range: -75
at .substring(String.java:1931) ~[na:1.8.0_111]
at .preserveSubpackageName(SpringBootVFS.java:61) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at $list$0(SpringBootVFS.java:53) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at $3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_111]
at $ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_111]
at .copyInto(AbstractPipeline.java:481) ~[na:1.8.0_111]
at .wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_111]
at $ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_111]
at .evaluate(AbstractPipeline.java:234) ~[na:1.8.0_111]
at .collect(ReferencePipeline.java:499) ~[na:1.8.0_111]
at .list(SpringBootVFS.java:54) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at .list(VFS.java:203) ~[mybatis-3.4.5.jar:3.4.5]
at .find(ResolverUtil.java:220) ~[mybatis-3.4.5.jar:3.4.5]
at .registerAliases(TypeAliasRegistry.java:130) ~[mybatis-3.4.5.jar:3.4.5]
at .buildSqlSessionFactory(SqlSessionFactoryBean.java:434) ~[mybatis-spring-1.3.1.jar:1.3.1]
at .afterPropertiesSet(SqlSessionFactoryBean.java:380) ~[mybatis-spring-1.3.1.jar:1.3.1]
at .getObject(SqlSessionFactoryBean.java:547) ~[mybatis-spring-1.3.1.jar:1.3.1]
at .sqlSessionFactory(MybatisAutoConfiguration.java:188) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at $$EnhancerBySpringCGLIB$$$sqlSessionFactory$1(<generated>) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at $$EnhancerBySpringCGLIB$$a6f329c1$$FastClassBySpringCGLIB$$4c25125.invoke(<generated>) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at .invokeSuper(MethodProxy.java:228) ~[spring-core-4.3..jar:4.3.]
at $BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3..jar:4.3.]
at $$EnhancerBySpringCGLIB$$a6f329c1.sqlSessionFactory(<generated>) ~[mybatis-spring-boot-autoconfigure-2.2.2.jar:2.2.2]
at .invoke0(Native Method) ~[na:1.8.0_111]
at .invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
at .invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at .invoke(Method.java:498) ~[na:1.8.0_111]
at .instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3..jar:4.3.]
... 61 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:60471', transport: 'socket'