All Downloads are FREE. Search and download functionalities are using the official Maven repository.

router.1.7.4.source-code.jrouter-spring.xml Maven / Gradle / Ivy

Go to download

jrouter是一个围绕对象方法基于责任链(拦截器)模式设计的开源轻量级Java容器。它专注于方法的映射、调用、拦截和结果处理,采用基于配置和注解的方式来抽取和收集程序中对象的方法(method)以用于路由映射,HTTP控制器,RPC,各种应用等。

There is a newer version: 1.8.7
Show newest version
<?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"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">
    <description>jrouter与springframework集成的配置文件</description>

    <!-- JRouter ActionFactory -->
    <bean id="actionFactory" class="jrouter.spring.DefaultActionFactoryBean">
        <!-- optional default:null -->
        <property name="configLocation" value="classpath:jrouter.xml"/>
        <!-- optional default -->
        <property name="actionFactoryClass" value="jrouter.impl.PathActionFactory"/>
        <!-- optional default -->
        <property name="objectFactory">
            <bean class="jrouter.spring.SpringObjectFactory"/>
        </property>
        <!-- optional default -->
        <property name="actionFactoryProperties">
            <value>
                <!-- optional default:null deprecated since 1.6.6 -->
                <!--actionInvocationClass = jrouter.impl.PathActionInvocation-->
                <!-- optional default:null -->
                defaultInterceptorStack = empty
                <!-- optional default:null -->
                defaultResultType = empty
                <!-- optional default -->
                pathSeparator = /
                <!-- optional default -->
                extension = .
                <!-- optional default -->
                actionCacheNumber = 10000
                <!-- optional default -->
                bytecode = javassist
                <!-- optional default -->
                converterFactory = jrouter.impl.MultiParameterConverterFactory
                <!-- optional default:null -->
                interceptorMethodChecker = jrouter.ActionInvocation.invoke(**)|jrouter.ActionInvocation.invokeActionOnly(**)
            </value>
        </property>

        <!-- scan classes properties -->
        <property name="componentClassScanProperties">
            <list>
                <value>
                    <!-- required -->
                    package = jrouter
                    <!-- optional, if empty means all -->
                    includeExpression = jrouter.impl.**
                    <!-- optional -->
                    excludeExpression = jrouter.result.**, jrouter.interceptor.**
                </value>
            </list>
        </property>
        <property name="interceptors">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>jrouter.interceptor.SampleInterceptor</value>
            </list>
        </property>
        <property name="interceptorStacks">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>jrouter.interceptor.DefaultInterceptorStack</value>
            </list>
        </property>
        <property name="resultTypes">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>jrouter.result.DefaultResult</value>
            </list>
        </property>
        <property name="results">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>jrouter.result.DefaultResult</value>
            </list>
        </property>
        <property name="actions">
            <list>
                <!-- the value can be the class name or the ref bean: -->
            </list>
        </property>
        <property name="componentBeanScanProperties">
            <value>
                <!-- required -->
                includeComponentBeanExpression =
                <!-- optional -->
                excludeComponentBeanExpression =
                <!-- optional -->
                includeComponentClassExpression =
                <!-- optional -->
                excludeComponentClassExpression =
            </value>
        </property>

        <property name="aopActions">
            <list>
                <bean class="jrouter.spring.AopActionBean">
                    <property name="matches" value="/**"/>
                    <property name="interceptorStackNames" value="empty"/>
                    <property name="interceptorNames" value=""/>
                    <property name="typeName" value="add-before"/>
                </bean>
            </list>
        </property>
    </bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy