ApplicationContext ctx = new FileSystemXmlApplicationContext("F:\\Tomcat 5.0\\webapps\\Systrade\\WEB-INF\\classes\\applicationContext.xml");
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation">
<value>F:\Tomcat 5.0\webapps\Systrade\WEB-INF\classes\hibernate.cfg.xml</value>
</property>
</bean>
怎么把他们转换到相对目录的读取法呀! Systrade这是这个项目的工程文件名!
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation">
<value>F:\Tomcat 5.0\webapps\Systrade\WEB-INF\classes\hibernate.cfg.xml</value>
</property>
</bean>
怎么把他们转换到相对目录的读取法呀! Systrade这是这个项目的工程文件名!
new FileSystemXmlApplicationContext("classpath:地址");
没有classpath的话就是从当前的工作目录