how to add mongo option configuration to spring -


मेरी मॉन्गो कॉन्फ़िग इस तरह दिखता है

  & lt; beans xmlns = "http: // Www.springframework.org/schema/beans "xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xmlns: संदर्भ =" http://www.springframework.org/schema/context " Xmlns: मोंगो = "http://www.springframework.org/schema/data/mongo" xsi: स्कीमा स्थान = "http://www.springframework.org/schema/beans http://www.springframework.org/schema / बीन्स / साइप्रिंग- बीन्स.एक्सएसडी http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/ स्कीमा / डेटा / मॉन्गो http://www.springframework.org/schema/data/mongo/spring-mongo.xsd"> & Lt; बीन आईडी = "मोंगो" वर्ग = "कॉम। मैंगोडब। मोंगो" & gt; & Lt; constructor-arg नाम = "addr" ref = "address" / & gt; & Lt; कन्स्ट्रक्टर- आर्ग नाम = "विकल्प" रेफरी = "विकल्प" / & gt; & Lt; / सेम ​​& gt; & Lt; बीन आईडी = "विकल्प" वर्ग = "com.mongodb.MongoOptions" & gt; & Lt; प्रॉपर्टी नाम = "कनेक्शनपरहास्ट" मान = "100" / & gt; & Lt; प्रॉपर्टी नाम = "मैक्सवाइटटाइम" मान = "500" / & gt; & Lt; / सेम ​​& gt; & Lt; बीन आईडी = "पता" वर्ग = "com.mongodb.ServerAddress" & gt; & Lt; constructor-arg नाम = "होस्ट" मान = "X.X.X.X" / & gt; & Lt; कन्स्ट्रक्टर- आर्ग नाम = "पोर्ट" मान = "27017" / & gt; & Lt; / सेम ​​& gt; & Lt; बीन आईडी = "मंगोटेमप्लेट" वर्ग = "org.springframework.data.mongodb.core.MongoTemplate" & gt; & Lt; constructor-arg रेफरी = "मोंगो" / & gt; & Lt; constructor-arg नाम = "डेटाबेसनाम" मान = "परीक्षण" / & gt; & Lt; / सेम ​​& gt; ...  

सब कुछ अच्छी तरह से काम करता है!

लेकिन करने वाली ब्लॉक के लिए कनेक्शन-गुणक "। जब मैं इसे जोड़ता हूं, तो मुझे ऐसी कोई त्रुटि होती है:

  org.springframework.beans.NotWritablePropertyException: अमान्य संपत्ति सेन वर्ग के 'थ्रेड-अनुमति-से-ब्लॉक-के-कनेक्शन-गुणक' Com.mongodb.MongoOptions]: बीन प्रॉपर्टी 'धागे-अनुमति-से-ब्लॉक-के-कनेक्शन-गुणक' लिखे जाने योग्य नहीं है या एक अवैध सेटर विधि है। क्या सेटर का पैरामीटर प्रकार प्राप्तकर्ता के रिटर्न प्रकार से मेल खाता है?  

क्या आप जानते हैं कि क्या होता है? मेरा नया एक्सएमएल इस तरह दिखता है:

  & lt; बीन आईडी = "विकल्प" वर्ग = "com.mongodb.MongoOptions" & gt; & Lt; प्रॉपर्टी नाम = "कनेक्शनपरहास्ट" मान = "100" / & gt; & Lt; संपत्ति नाम = "थ्रेड-अनुमति-से-ब्लॉक-के-कनेक्शन-गुणक" मान = "5" / & gt; & Lt; प्रॉपर्टी नाम = "मैक्सवाइटटाइम" मान = "500" / & gt; & Lt; / सेम ​​& gt;  

प्रॉपर्टी का नाम थ्रेडअलाइटेड टोब्लॉकफोर कन्नेक्शन मल्टीप्लियर com.mongodb में है। MongoOptions

  & lt; बीन आईडी = "विकल्प" वर्ग = "com.mongodb.MongoOptions" & gt; & Lt; प्रॉपर्टी नाम = "कनेक्शनपरहास्ट" मान = "100" / & gt; & Lt; प्रॉपर्टी नाम = "थ्रेडअलाइज्ड टूब्लॉकफ़ोअरकॉन्क्शन मल्टीप्लेयर" मान = "5" / & gt; & Lt; प्रॉपर्टी नाम = "मैक्सवाइटटाइम" मान = "500" / & gt; & Lt; / सेम ​​& gt;  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -