标签:
<object id="exampleInitObject" type="Examples.ExampleObject" init-method="init" destroy-method="cleanup" singleton="false"/> [C#] public class ExampleObject {
public void cleanup()
{
// do some destruction work (such as closing any open connection (s))
} public void Init() { // do some initialization work } } 这样spring创建实例的时候,会自己去调用Init进行一些初始化的工作
Spring.net init-method destroy-method
标签:
原文地址:http://www.cnblogs.com/kexb/p/5919571.html