Skip to content

<mongo:mapping-converter> can't be configured as nested bean definition [DATAMONGO-892] #1818

Closed
@spring-projects-issues

Description

@spring-projects-issues

Artem Bilan opened DATAMONGO-892 and commented

The sample config which worked in the 1.1.1 version, but doesn't work now:

<beans:bean id="messageStore" class="org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageStore">
		<beans:constructor-arg ref="mongoDbFactory"/>
		<beans:constructor-arg>
			<mongo:mapping-converter>
				<mongo:custom-converters>
					<mongo:converter>
						<beans:bean class="org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageGroupStoreTests$MessageReadConverter"/>
					</mongo:converter>
				</mongo:custom-converters>
			</mongo:mapping-converter>
		</beans:constructor-arg>
		<beans:constructor-arg value="testConfigurableMongoDbMessageStore"/>
	</beans:bean>

That's because MappingMongoConverterParser doesn't check if the parserContext.isNested(), registers BeanDefinition and returns null


Affects: 1.4.1 (Codd SR1)

Referenced from: pull request #165

Backported to: 1.4.2 (Codd SR2)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions