关于at tk.mybatis.spring.mapper.SpringBootBindUtil$SpringBoot2Bind.bind(SpringBootBindUtil.java129)

at tk.mybatis.spring.mapper.SpringBootBindUtil$SpringBoot2Bind.bind(SpringBootBindUtil.java:129) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na]

异常信息如下

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at tk.mybatis.spring.mapper.SpringBootBindUtil S p r i n g B o o t 2 B i n d . b i n d ( S p r i n g B o o t B i n d U t i l . j a v a : 129 )   [ m a p p e r s p r i n g b o o t a u t o c o n f i g u r e 1.2.3. j a r : n a ] a t t k . m y b a t i s . s p r i n g . m a p p e r . S p r i n g B o o t B i n d U t i l . b i n d ( S p r i n g B o o t B i n d U t i l . j a v a : 58 )   [ m a p p e r s p r i n g b o o t a u t o c o n f i g u r e 1.2.3. j a r : n a ] a t t k . m y b a t i s . s p r i n g . m a p p e r . C l a s s P a t h M a p p e r S c a n n e r . s e t M a p p e r P r o p e r t i e s ( C l a s s P a t h M a p p e r S c a n n e r . j a v a : 48 )   [ m a p p e r s p r i n g b o o t a u t o c o n f i g u r e 1.2.3. j a r : n a ] a t t k . m y b a t i s . s p r i n g . a n n o t a t i o n . M a p p e r S c a n n e r R e g i s t r a r . r e g i s t e r B e a n D e f i n i t i o n s ( M a p p e r S c a n n e r R e g i s t r a r . j a v a : 33 )   [ m a p p e r s p r i n g b o o t a u t o c o n f i g u r e 1.2.3. j a r : n a ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . I m p o r t B e a n D e f i n i t i o n R e g i s t r a r . r e g i s t e r B e a n D e f i n i t i o n s ( I m p o r t B e a n D e f i n i t i o n R e g i s t r a r . j a v a : 86 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . l a m b d a SpringBoot2Bind.bind(SpringBootBindUtil.java:129) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na] at tk.mybatis.spring.mapper.SpringBootBindUtil.bind(SpringBootBindUtil.java:58) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na] at tk.mybatis.spring.mapper.ClassPathMapperScanner.setMapperProperties(ClassPathMapperScanner.java:48) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na] at tk.mybatis.spring.annotation.MapperScannerRegistrar.registerBeanDefinitions(MapperScannerRegistrar.java:33) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na] at org.springframework.context.annotation.ImportBeanDefinitionRegistrar.registerBeanDefinitions(ImportBeanDefinitionRegistrar.java:86) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda loadBeanDefinitionsFromRegistrars 1 ( C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . j a v a : 385 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t j a v a . u t i l . L i n k e d H a s h M a p . f o r E a c h ( L i n k e d H a s h M a p . j a v a : 684 )   [ n a : 1.8. 0 1 31 ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . l o a d B e a n D e f i n i t i o n s F r o m R e g i s t r a r s ( C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . j a v a : 384 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . l o a d B e a n D e f i n i t i o n s F o r C o n f i g u r a t i o n C l a s s ( C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . j a v a : 148 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . l o a d B e a n D e f i n i t i o n s ( C o n f i g u r a t i o n C l a s s B e a n D e f i n i t i o n R e a d e r . j a v a : 120 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s P o s t P r o c e s s o r . p r o c e s s C o n f i g B e a n D e f i n i t i o n s ( C o n f i g u r a t i o n C l a s s P o s t P r o c e s s o r . j a v a : 331 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s P o s t P r o c e s s o r . p o s t P r o c e s s B e a n D e f i n i t i o n R e g i s t r y ( C o n f i g u r a t i o n C l a s s P o s t P r o c e s s o r . j a v a : 236 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . P o s t P r o c e s s o r R e g i s t r a t i o n D e l e g a t e . i n v o k e B e a n D e f i n i t i o n R e g i s t r y P o s t P r o c e s s o r s ( P o s t P r o c e s s o r R e g i s t r a t i o n D e l e g a t e . j a v a : 275 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . P o s t P r o c e s s o r R e g i s t r a t i o n D e l e g a t e . i n v o k e B e a n F a c t o r y P o s t P r o c e s s o r s ( P o s t P r o c e s s o r R e g i s t r a t i o n D e l e g a t e . j a v a : 95 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . i n v o k e B e a n F a c t o r y P o s t P r o c e s s o r s ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 706 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . r e f r e s h ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 532 )   [ s p r i n g c o n t e x t 5.2.5. R E L E A S E . j a r : 5.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . w e b . s e r v l e t . c o n t e x t . S e r v l e t W e b S e r v e r A p p l i c a t i o n C o n t e x t . r e f r e s h ( S e r v l e t W e b S e r v e r A p p l i c a t i o n C o n t e x t . j a v a : 141 )   [ s p r i n g b o o t 2.2.6. R E L E A S E . j a r : 2.2.6. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h ( S p r i n g A p p l i c a t i o n . j a v a : 747 ) [ s p r i n g b o o t 2.2.6. R E L E A S E . j a r : 2.2.6. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h C o n t e x t ( S p r i n g A p p l i c a t i o n . j a v a : 397 ) [ s p r i n g b o o t 2.2.6. R E L E A S E . j a r : 2.2.6. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 315 ) [ s p r i n g b o o t 2.2.6. R E L E A S E . j a r : 2.2.6. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1226 ) [ s p r i n g b o o t 2.2.6. R E L E A S E . j a r : 2.2.6. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1215 ) [ s p r i n g b o o t 2.2.6. R E L E A S E . j a r : 2.2.6. R E L E A S E ] a t c o m . z y k . g a m l l . u s e r . G m a l l U s e r A p p l i c a t i o n . m a i n ( G m a l l U s e r A p p l i c a t i o n . j a v a : 14 ) [ c l a s s e s / : n a ] C a u s e d b y : j a v a . l a n g . r e f l e c t . I n v o c a t i o n T a r g e t E x c e p t i o n : n u l l a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d )   [ n a : 1.8. 0 1 31 ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 )   [ n a : 1.8. 0 1 31 ] a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 )   [ n a : 1.8. 0 1 31 ] a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 498 )   [ n a : 1.8. 0 1 31 ] a t t k . m y b a t i s . s p r i n g . m a p p e r . S p r i n g B o o t B i n d U t i l 1(ConfigurationClassBeanDefinitionReader.java:385) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:1.8.0_131] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:384) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE] at com.zyk.gamll.user.GmallUserApplication.main(GmallUserApplication.java:14) [classes/:na] Caused by: java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131] at tk.mybatis.spring.mapper.SpringBootBindUtil SpringBoot2Bind.bind(SpringBootBindUtil.java:127) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na]
… 22 common frames omitted
Caused by: java.util.NoSuchElementException: No value bound
at org.springframework.boot.context.properties.bind.BindResult.get(BindResult.java:56) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
… 27 common frames omitted

解决方式

在 application.properties 配置文件中,加一行

mapper.identity=MYSQL
发布了39 篇原创文章 · 获赞 19 · 访问量 1463

猜你喜欢

转载自blog.csdn.net/weixin_44222272/article/details/105575125