我有我的配置:
<context:property-placeholder location="classpath:idm.properties" />
<bean id="idmPropertyHolder" class="fi.utu.resurssitilaus.idm.IdmPropertyHolder">
<property name="url" value="${idm.url}" />
<property name="user" value="${idm.user}" />
<property name="password" value="${idm.password}" />
<property name="proxyHost" value="${http.proxyHost}" />
<property name="proxyPort" value="${http.proxyPort}" />
</bean>
Run Code Online (Sandbox Code Playgroud)
我收到了错误
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'idmPropertyHolder' defined in ServletContext resource [/WEB-INF/idm-config.xml]: Could not resolve placeholder 'idm.url'
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272)
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) …Run Code Online (Sandbox Code Playgroud) Servlet容器集的类路径是什么?
据我了解,涉及三个组成部分.在该JAR文件lib的Servlet容器的目录,然后在类的WEB-INF/classes在和JAR文件WEB-INF/lib的目录.libServlet容器目录中的类被添加到系统类路径中,动态类路径包括lib目录中的JAR文件和目录中的类classes.
什么是动态类路径集?动态类路径是指向所有目录下的所有目录WEB-INF还是包含所有单个类和JAR文件WEB-INF/lib,WEB-INF/classes或者只指向两个目录WEB-INF/classes和WEB-INF/lib?说我有一个名为目录foo中WEB-INF包含bar.properties.现在bar.properties也是在班级路径?