Spring Boot simple xml configuration mybatis

the mybatis: 
  of the type -aliases- Package Penalty for: com.xxx.xxx.pojo 
  #config -location: the CLASSPATH: the mybatis / mybatis- config.xml 
  Mapper -locations: the CLASSPATH: Mapper / * .xml 
  #Mybatis Attribute Mapping - open hump named 
  configuration : 
    the Map-Underscore-to-CAMEL-Case: to true jdbc-for-null-of the type: 'null'
    

Empty data set storage may be

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
    "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
    <settings>
        <setting name="cacheEnabled" value="true"/>
        <setting name="logPrefix" value="dao."/>
        <!- When new, the new object is empty to do, if you do not configure the object is received when mybatis is null, can not be properly parse ->
        <Setting name = " jdbcTypeForNull"= value " NULL " /> 
        <-! When the query also returns data as a null field -> 
        <Setting name = " callSettersOnNulls " value = " to true " /> 
        <-! is turned on automatically hump naming convention (camel Case ) mapping, i.e. from the database column names A_COLUMN similar to the mapping of the attribute name aColumn -> 
        <Setting name = " mapUnderscoreToCamelCase " value = " to true " /> 
    </ Settings> 
</ Configuration>

 

Guess you like

Origin www.cnblogs.com/kkvt/p/12529109.html