配置问题

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at tk.mybatis.spring.mapper.SpringBootBindUtil$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.mapper.autoconfigure.MapperAutoConfiguration$AutoConfiguredMapperScannerRegistrar.registerBeanDefinitions(MapperAutoConfiguration.java:191) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:364) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE]
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:676) ~[na:1.8.0_77]Caused by: java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
    at tk.mybatis.spring.mapper.SpringBootBindUtil$SpringBoot2Bind.bind(SpringBootBindUtil.java:127) ~[mapper-spring-boot-autoconfigure-1.2.3.jar:na]
    ... 21 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.1.1.RELEASE.jar:2.1.1.RELEASE]
    ... 26 common frames omitted

 

解决:

在yaml中配置:

mapper:
  identity: MYSQL

 

你可能感兴趣的:(报错解决异常)