Skip to content

BeanDefinitionStoreException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String #1

@utact

Description

@utact

문제 원인:

  • MyBatis 매퍼가 애플리케이션 컨텍스트에 너무 이르게 등록되면서 Spring의 DB 초기화 의존성 검사와 충돌한 것으로 보입니다.
  • @MapperScan을 메인 애플리케이션 클래스에 두면 Mapper 등록 시점이 너무 빨라 Spring의 일부 빈 후처리자(특히 DB 초기화 의존성 검사)가 예상치 못한 상태(FactoryBean 정보가 문자열로 설정된 경우 등)를 보게 되어 위와 같은 예외가 발생할 수 있습니다.

대처 방안:

  • 별도 @Configuration으로 분리하여 등록 시점/순서를 안정화하고 문제를 회피합니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BEBackend Issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions