读书人

servlet 引述spring

发布时间: 2012-09-12 09:21:30 作者: rapoo

servlet 引用spring

WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext());//获取spring的context ? ??

ClientConfigClass clientConfigClass = (ClientConfigClass) wac.getBean("ClientConfigClassBean");

clientConfigClass.getLogFilePath();




<bean id="ClientConfigClassBean"><property name="defaultServerIP"> <value>172.20.32.237</value></property><property name="logFilePath"> <value>./log</value></property><property name="sendFailRetryNum"> <value>10</value></property></bean>

读书人网 >软件架构设计

热点推荐