如结构:
proName
src
applicationContext.xml
config
config.properties 在applicationContext中怎么加载不是在src目下的配置文件,config在这里只是一个文件夹
proName
src
applicationContext.xml
config
config.properties 在applicationContext中怎么加载不是在src目下的配置文件,config在这里只是一个文件夹
解决方案 »
- 我用 return new ModelAndView("forward:sysAnaMp.html");没跳转,为什么?
- WEB-INF的路径问题
- 大家来讨论一下Hibernate的关联关系什么时候使用合适呢
- 导入项目时,不知道报错是哪里错了!!
- java到底怎么学?
- Hibernate中BasicDAO和JNDI DAO有什么区别
- 哪位大侠给我介绍几本学习strus的好书
- java中共有多少runtime exception?
- 请问再Jbuilder里可以单步调试EJB程序吗?我的Jbuilder7+jboss3.07已经整合好!
- Error creating bean with name 'mySecurityMetadataSource': Invocation of init met
- 请问数据库设计时,什么时候才用联合主键?
- xml组装问题
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:config.properties</value>
</list>
</property>
</bean>
<context:property-placeholder location="classpath*:config/*.properties" />spring 2.5.x
<bean id="placeHolder"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:config/config.properties</value>
</list>
</property>
</bean>
我上面的帖子请忽略。2.5.6<bean id="placeHolder"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:config/config.properties</value>
</list>
</property>
</bean>
3.0.5<context:property-placeholder location="file:config/file.properties" />
如果不是特意把放到classpath外面去的话,可以在工程中,把config也设置为src目录,或者在jvm中添加classpath,指向config目录。