CAS:How to fix "No bean named 'healthCheckMonitor' is defined"

在部署JASIG CAS时可能会碰到如下的异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlerMappingC' defined in ServletContext resource [/WEB-INF/cas-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthCheckController' defined in ServletContext resource [/WEB-INF/cas-servlet.xml]: Cannot resolve reference to bean 'healthCheckMonitor' while setting bean property 'healthCheckMonitor'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'healthCheckMonitor' is defined


解决办法是在deployConfigContext.xml中添加:

<bean id="healthCheckMonitor" class="org.jasig.cas.monitor.HealthCheckMonitor">
    <property name="monitors">
      <list>
        <bean class="org.jasig.cas.monitor.MemoryMonitor"
            p:freeMemoryWarnThreshold="10" />
      
        <bean class="org.jasig.cas.monitor.SessionMonitor"
            p:ticketRegistry-ref="ticketRegistry"
            p:serviceTicketCountWarnThreshold="5000"
            p:sessionCountWarnThreshold="100000" />
      </list>
    </property>
  </bean>

猜你喜欢

转载自zyjbupt.iteye.com/blog/1908046
今日推荐