ApplicationContext.xml 2.88 KB
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:api="http://www.xiniunet.com/api"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.xiniunet.com/api http://www.xiniunet.com/api/api.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.1.xsd">

    <!--① 扫描Spring Bean-->
    <context:component-scan base-package="com.xiniunet.open.api"/>
    <context:component-scan base-package="com.xiniunet.open.tool"/>
    <!-- 启动Rop框架 -->
    <api:api-config
            id="router"
            session-manager="apiSessionManager"
            app-secret-manager="appSecretManager"
            service-access-controller="serviceAccessController"
            service-timeout-seconds="60"
            invoke-times-controller="invokeTimesController"
            upload-file-max-size="10"
            upload-file-types="png,gif,jpg"
            core-pool-size="5000"
            max-pool-size="20000"
            queue-capacity="1000"
            keep-alive-seconds="120" />
    <bean id="apiSessionManager" class="com.xiniunet.open.manager.ApiSessionManager" />
    <bean id="invokeTimesController" class="com.xiniunet.open.manager.ApiInvokeTimesController"/>
    <bean id="appSecretManager" class="com.xiniunet.open.manager.ApiAppSecretManager"/>
    <bean id="serviceAccessController" class="com.xiniunet.open.manager.ApiServiceAccessController"/>
    <bean id="springContext" class="com.xiniunet.framework.util.SpringContext"/>

    <!--<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">-->
    <!--    <property name="maxTotal" value="8" />-->
    <!--    <property name="testOnBorrow" value="true" />-->
    <!--</bean>-->
    <!--<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">-->
    <!--    <property name="connectionFactory" ref="jedisConnectionFactory"/>-->
    <!--    <property name="defaultSerializer">-->
    <!--        <bean class="org.springframework.data.redis.serializer.StringRedisSerializer"/>-->
    <!--    </property>-->

    <!--</bean>-->

    <!--<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" destroy-method="destroy">-->
    <!--    <property name="poolConfig" ref="jedisPoolConfig"/>-->
    <!--    <property name="hostName" value="${redis.host}"/>-->
    <!--    <property name="port" value="${redis.port}"/>-->
    <!--    <property name="password" value="${redis.password}"/>-->
    <!--    <property name="timeout" value="15000"/>-->
    <!--    <property name="usePool" value="true"/>-->
    <!--</bean>-->
  </beans>