Skip to content

"NoSuchBeanDefinitionException: No bean named 'xxxxxxx' available" occurred when use together PropertyOverrideConfigurer #552

Closed
@ryou-ks

Description

@ryou-ks

there is an error happened when I used mybatis-spring-2.0.5/spring 5.2.6/mybatis3.5.5 as follow:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'targetDataSource' available

How to solve this problem

my spring xml code

<bean>
   <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyOverrideConfigurer">
      <property name="locations" />
	<list>
           <value>classpath:mybatis/database.properties<value/>
        <list>
      <property/>
   </bean>

   <bean id="targetDataSource" class="org.springframework.jndi.jndiObjectFactoryBean">

 <beans/>


my properties (database.properties)
targetDataSource.jndiName=aa/bb

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions