-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DATA-1293 - Allowed id attribute in addition to client-uri attribute in MongoDbFactoryParser. #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…in MongoDbFactoryParser. Additionally, the previous approach allowed any attribute to be set if write-concern attribute was set. Fixed that also.
@@ -73,7 +74,10 @@ protected AbstractBeanDefinition parseInternal(Element element, ParserContext pa | |||
BeanDefinition mongoUri = getMongoUri(element); | |||
|
|||
if (mongoUri != null) { | |||
if (element.getAttributes().getLength() >= 2 && !element.hasAttribute("write-concern")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rather white-list the allowed attributes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…of allowed attributes and compare it to total attributes count.
thanks @vkhoroshko! |
…bute in MongoDbFactoryParser. We now allow write-concern and id to be configured along with the uri or client-uri attribute of <mongo:db-factory. Original Pull Request: #328 CLA: 140120150929074128 (Viktor Khoroshko)
Move configuration parsing error into method actually responsible for reading uri/client-uri attributes. Original Pull Request: #328
…bute in MongoDbFactoryParser. We now allow write-concern and id to be configured along with the uri or client-uri attribute of <mongo:db-factory. Original Pull Request: #328 CLA: 140120150929074128 (Viktor Khoroshko)
Move configuration parsing error into method actually responsible for reading uri/client-uri attributes. Original Pull Request: #328
pushed to master and back ported to 1.8.x (gosling). thanks @vkhoroshko ! |
Additionally, the previous approach allowed any attribute to be set if write-concern attribute was set. Fixed that also.