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

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

Go to download

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

The newest version!
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">
    <description>jrouter与springframework集成的配置文件</description>

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

        <!-- scan classes properties -->
        <property name="componentClassScanProperties">
            <list>
                <value>
                    <!-- required -->
                    package = net.jrouter
                    <!-- optional, if empty means all -->
                    includeExpression = net.jrouter.impl.**
                    <!-- optional -->
                    excludeExpression = net.jrouter.result.**, net.jrouter.interceptor.**
                </value>
            </list>
        </property>
        <property name="interceptors">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>net.jrouter.interceptor.SampleInterceptor</value>
            </list>
        </property>
        <property name="interceptorStacks">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>net.jrouter.interceptor.DefaultInterceptorStack</value>
            </list>
        </property>
        <property name="resultTypes">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>net.jrouter.result.DefaultResult</value>
            </list>
        </property>
        <property name="results">
            <list>
                <!-- the value can be the class name or the ref bean: -->
                <value>net.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="net.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