You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
567 B
Java

package com.manage.config;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
@Component //或者继承implements ApplicationRunner 实现run()方法
public class MyHandel {
@PostConstruct
public void loadDic() {
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
}
//在spring容器关闭时释放
@PreDestroy
public void destroy() {
//系统运行结束
}
}