ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [SpringBoot] Could not bind properties to 'MybatisProperties'
    카테고리 없음 2019. 10. 26. 01:13

    ***

    mybatis properties 바인드가 안되는 에러 발생 (v2.2.0.RELEASE ) 

    ConfigServletWebServerApplicationContext : 
    Exception encountered during context initialization - cancelling refresh attempt: 
    org.springframework.beans.factory.UnsatisfiedDependencyException: 
    Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration': 
    Unsatisfied dependency expressed through constructor parameter 0; 
    nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: 
    Error creating bean with name 'mybatis-org.mybatis.spring.boot.autoconfigure.MybatisProperties': 
    Could not bind properties to 'MybatisProperties' : 
    prefix=mybatis, ignoreInvalidFields=false, ignoreUnknownFields=true; 
    nested exception is org.springframework.boot.context.properties.bind.BindException: 
    Failed to bind properties under 'mybatis.configuration.mapped-statements[0].parameter-map.parameter-mappings[0]' to org.apache.ibatis.mapping.ParameterMapping
    
    ***************************
    APPLICATION FAILED TO START
    ***************************
    
    Description:
    
    Failed to bind properties under 'mybatis.configuration.mapped-statements[0].parameter-map.parameter-mappings[0]' to org.apache.ibatis.mapping.ParameterMapping:
    
        Reason: Failed to extract parameter names for org.apache.ibatis.mapping.ParameterMapping(org.apache.ibatis.mapping.ParameterMapping$1)
    
    Action:
    
    Update your application's configuration

     

     

    ***

    resources 폴더에 spring.properties 파일을 생성하고 값을 지정함

     

    ※ application.properties 아님!

     

    [src/main/resources/spring.properties]
    
    spring.jndi.ignore=true

     

     

     

    ***

    https://github.com/mybatis/spring-boot-starter/issues/350

     

Designed by Tistory.