Search in sources :

Example 1 with RequestMappingInfoBuilderImpl

use of io.leopard.vhost.RequestMappingInfoBuilderImpl in project leopard by tanhaichao.

the class LeopardHandlerMapping method initApplicationContext.

@Override
protected void initApplicationContext(ApplicationContext context) throws BeansException {
    try {
        Redis redis = (Redis) context.getBean("sessionRedis");
        StoreRedisImpl.setRedis(redis);
    } catch (NoSuchBeanDefinitionException e) {
        logger.warn("没有配置sessionRedis,不启用分布式session.");
    } catch (Exception e) {
        logger.error(e.getMessage(), e);
    }
    super.initApplicationContext(context);
    requestMappingInfoBuilder = new RequestMappingInfoBuilderImpl(context);
}
Also used : Redis(io.leopard.redis.Redis) NoSuchBeanDefinitionException(org.springframework.beans.factory.NoSuchBeanDefinitionException) BeansException(org.springframework.beans.BeansException) NoSuchBeanDefinitionException(org.springframework.beans.factory.NoSuchBeanDefinitionException) RequestMappingInfoBuilderImpl(io.leopard.vhost.RequestMappingInfoBuilderImpl)

Aggregations

Redis (io.leopard.redis.Redis)1 RequestMappingInfoBuilderImpl (io.leopard.vhost.RequestMappingInfoBuilderImpl)1 BeansException (org.springframework.beans.BeansException)1 NoSuchBeanDefinitionException (org.springframework.beans.factory.NoSuchBeanDefinitionException)1