spring43+mybatis-plus 去掉自动驼峰设置在springxml中如何设置
如果要在Spring.xml中去掉MyBatis-Plus的自动驼峰设置,可以在MyBatis-Plus的配置文件中添加以下配置:
<configuration>
<global-config>
<db-config>
<!-- 去掉自动驼峰设置 -->
<column-underline>true</column-underline>
</db-config>
</global-config>
</configuration>
然后在Spring.xml中引用该配置文件即可:
<bean id="sqlSessionFactory" class="com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:mybatis-config.xml"/>
</bean>
``
原文地址: http://www.cveoy.top/t/topic/f6uN 著作权归作者所有。请勿转载和采集!