spring主动注入,类似每次调用new一个对象
页面调用:
<!-- lang: java -->
// 使用spring注入一个新的connectionSSH对象(like new)
Connections conn = getConnectionSSH();
spring配置:
<!-- lang: xml -->
<lookup-method name="getConnectionTelnet" bean="connectionTelnet"/>
spring主动注入,类似每次调用new一个对象
页面调用:
<!-- lang: java -->
// 使用spring注入一个新的connectionSSH对象(like new)
Connections conn = getConnectionSSH();
spring配置:
<!-- lang: xml -->
<lookup-method name="getConnectionTelnet" bean="connectionTelnet"/>
转载于:https://my.oschina.net/u/225084/blog/170615