Open
!20 在与Spring集成时可以设置自己的BaseMapper。

 小红帽:master 闲.大赋:master

 小红帽 Created on: 2017-10-16 12:15

增加两个属性baseMapper和amis。

baseMapper:自定义一个基接口;

amis:Map对象,BaseMapper中自定义接口方法名称和该方法的具体实现。

对于文档中 "25.6. 设置自己的BaseMapper" 对应的配置如下:

    <bean id="sqlManagerFactoryBean" class="org.beetl.sql.ext.spring4.SqlManagerFactoryBean">
        <property name="cs">
            <bean class="org.beetl.sql.ext.spring4.BeetlSqlDataSource">
                <property name="masterSource" ref="dataSource"></property>
            </bean>
        </property>
        <property name="dbStyle">
            <bean class="org.beetl.sql.core.db.H2Style"/>
        </property>
        <property name="sqlLoader">
            <bean class="org.beetl.sql.core.ClasspathLoader">
                <property name="sqlRoot" value="/sql"></property>
            </bean>
        </property>
        <property name="nc">
            <bean class="org.beetl.sql.core.UnderlinedNameConversion"/>
        </property>
        <property name="interceptors">
            <list>
                <bean class="org.beetl.sql.ext.DebugInterceptor"></bean>
            </list>
        </property>
        <property name="baseMapper" value="xxx.MyMapper"/>
        <property name="amis">
            <map>
                <entry key="selectCount" value-ref="selectCount"/>
                <entry key="selectAll" value-ref="selectAll"/>
            </map>
        </property>
    </bean>

1 comments, 2 participants 29 xiandafu 1578913709

Check whether the system can automatically merge this Pull Request...
The Pull Request cannot be automatically merged.
The Pull Request cannot be automatically merged.
Gitee trying to handle conflicts...
Gitee handled conflicts timeout, please fetch to the local handling
The current branch merge status has been updated, continue to operate after refreshing the page
The Pull Request can be automatically merged. , The target branch is a Protect branch and you do not have a merge permission
Merging Pull Request. Wait for a moment, the page will refresh automatically.