java - which context.getBean to use when get the bean from spring -


निम्न लिंक में

यह एक्सएमएल जैसे बीन को परिभाषित करता है

 < कोड> & lt; खरगोश: टेम्पलेट आईडी = "amqpTemplate" connection-factory = "connectionFactory" / & gt;  

फिर कॉलिंग कोड में, इसका उपयोग

  AmqpTemplate टेम्पलेट = context.getBean (AmqpTemplate.class);  

इसे क्यों उपयोग किया गया

  context.getBean (AmqpTemplate.class);  

के बजाय

  context.getBean ("amppTemplate");  

GetBean क्या है (AmqpTemplate.class) का मतलब है? मुझे यह XML द्वारा परिभाषित नहीं मिल रहा है।

getBean () < / पूर्व>

एक अतिभारित विधि है आप बीन नाम या बीन प्रकार से कॉल कर सकते हैं। क्लास के साथ कॉलिंग इस क्लास प्रकार का एकल उदाहरण देता है। अगर एक से अधिक एक अपवाद फेंकता है अगर कोई फिर से एक अपवाद फेंकता नहीं है।

देखें।


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -